|
|
@ -198,11 +198,15 @@ public class EntityCertificate {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
ASN1InputStream decoder = new ASN1InputStream((byte[]) altName.get(1));
|
|
|
|
ASN1InputStream decoder = new ASN1InputStream((byte[]) altName.get(1));
|
|
|
|
DLTaggedObject encoded = (DLTaggedObject) decoder.readObject();
|
|
|
|
DLTaggedObject encoded = (DLTaggedObject) decoder.readObject();
|
|
|
|
String othername = DERUTF8String.getInstance(
|
|
|
|
String otherName = DERUTF8String.getInstance(
|
|
|
|
((DLTaggedObject) ((DLSequence) encoded.getBaseObject())
|
|
|
|
((DLTaggedObject) ((DLSequence) encoded.getBaseObject())
|
|
|
|
.getObjectAt(1)).getBaseObject()).getString();
|
|
|
|
.getObjectAt(1)).getBaseObject()).getString();
|
|
|
|
if (Helper.EMAIL_ADDRESS.matcher(othername).matches())
|
|
|
|
int at = otherName.indexOf('@');
|
|
|
|
result.add(othername);
|
|
|
|
int dot = otherName.lastIndexOf('.');
|
|
|
|
|
|
|
|
if (at >= 0 && dot > at) // UTF-8 accepted, so basic test only
|
|
|
|
|
|
|
|
result.add(otherName);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Log.w("Ignoring otherName=" + otherName);
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
Log.w(ex);
|
|
|
|
Log.w(ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|