mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +02:00
Bump MiniDNS to 0.3.0-alpha1
Also add minidns-core as dependency to smack-core. This requires increasing the minimum required Android SDK level to 9, as this is what MiniDNS requires.
This commit is contained in:
parent
6c4a02691e
commit
a91ca2aebf
21 changed files with 156 additions and 237 deletions
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2014-2015 Florian Schmaus
|
||||
* Copyright 2014-2018 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -20,8 +20,6 @@ import java.util.List;
|
|||
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
import org.jivesoftware.smack.initializer.SmackInitializer;
|
||||
import org.jivesoftware.smack.util.DNSUtil;
|
||||
import org.jivesoftware.smack.util.StringTransformer;
|
||||
import org.jivesoftware.smack.util.SystemUtil;
|
||||
import org.jivesoftware.smack.util.stringencoder.Base64;
|
||||
import org.jivesoftware.smack.util.stringencoder.Base64UrlSafeEncoder;
|
||||
|
@ -43,12 +41,6 @@ public class Java7SmackInitializer implements SmackInitializer {
|
|||
SmackConfiguration.setDefaultHostnameVerifier(new XmppHostnameVerifier());
|
||||
Base64.setEncoder(Java7Base64Encoder.getInstance());
|
||||
Base64UrlSafeEncoder.setEncoder(Java7Base64UrlSafeEncoder.getInstance());
|
||||
DNSUtil.setIdnaTransformer(new StringTransformer() {
|
||||
@Override
|
||||
public String transform(String string) {
|
||||
return java.net.IDN.toASCII(string);
|
||||
}
|
||||
});
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ import javax.net.ssl.SSLPeerUnverifiedException;
|
|||
import javax.net.ssl.SSLSession;
|
||||
import javax.security.auth.kerberos.KerberosPrincipal;
|
||||
|
||||
import org.jivesoftware.smack.util.IpAddressUtil;
|
||||
import org.minidns.util.InetAddressUtil;
|
||||
|
||||
/**
|
||||
* HostnameVerifier implementation for XMPP. Verifies a given name, the 'hostname' argument, which
|
||||
|
@ -98,7 +98,7 @@ public class XmppHostnameVerifier implements HostnameVerifier {
|
|||
}
|
||||
|
||||
private static void match(String name, X509Certificate cert) throws CertificateException {
|
||||
if (IpAddressUtil.isIpAddress(name)) {
|
||||
if (InetAddressUtil.isIpAddress(name)) {
|
||||
matchIp(name, cert);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue