mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-31 15:20:09 -05:00
Merge branch 'remove_bouncycastle_dependency' into HEAD
This commit is contained in:
commit
6686b3e993
@ -8,7 +8,6 @@
|
|||||||
<classpathentry kind="lib" path="libs/commons-io-2.0.1.jar"/>
|
<classpathentry kind="lib" path="libs/commons-io-2.0.1.jar"/>
|
||||||
<classpathentry kind="lib" path="libs/jzlib-1.0.7.jar"/>
|
<classpathentry kind="lib" path="libs/jzlib-1.0.7.jar"/>
|
||||||
<classpathentry kind="lib" path="libs/jutf7-1.0.1-SNAPSHOT.jar"/>
|
<classpathentry kind="lib" path="libs/jutf7-1.0.1-SNAPSHOT.jar"/>
|
||||||
<classpathentry kind="lib" path="compile-only-libs/bcprov-jdk15-143.jar"/>
|
|
||||||
<classpathentry kind="lib" path="compile-only-libs/commons-codec-1.3.jar"/>
|
<classpathentry kind="lib" path="compile-only-libs/commons-codec-1.3.jar"/>
|
||||||
<classpathentry kind="lib" path="compile-only-libs/commons-logging-1.1.1.jar"/>
|
<classpathentry kind="lib" path="compile-only-libs/commons-logging-1.1.1.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
Binary file not shown.
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package com.fsck.k9.helper;
|
package com.fsck.k9.helper;
|
||||||
|
|
||||||
import org.bouncycastle.asn1.x509.X509Name;
|
import android.net.http.SslCertificate;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import com.fsck.k9.K9;
|
import com.fsck.k9.K9;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
@ -28,7 +28,6 @@ import java.util.Iterator;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.regex.PatternSyntaxException;
|
import java.util.regex.PatternSyntaxException;
|
||||||
import java.util.Vector;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements basic domain-name validation as specified by RFC2818.
|
* Implements basic domain-name validation as specified by RFC2818.
|
||||||
@ -198,14 +197,8 @@ public class DomainNameChecker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!hasDns) {
|
if (!hasDns) {
|
||||||
X509Name xName = new X509Name(certificate.getSubjectDN().getName());
|
SslCertificate sslCertificate = new SslCertificate(certificate);
|
||||||
Vector<?> val = xName.getValues();
|
return matchDns(thisDomain, sslCertificate.getIssuedTo().getCName());
|
||||||
Vector<?> oid = xName.getOIDs();
|
|
||||||
for (int i = 0; i < oid.size(); i++) {
|
|
||||||
if (oid.elementAt(i).equals(X509Name.CN)) {
|
|
||||||
return matchDns(thisDomain, (String)(val.elementAt(i)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user