Revert "Decode punycode in certificates"

This reverts commit c097457680.
pull/217/head
M66B 9 months ago
parent c097457680
commit 33f0462c8f

@ -194,7 +194,7 @@ public class EntityCertificate {
for (List altName : altNames) for (List altName : altNames)
if (altName.get(0).equals(GeneralName.rfc822Name)) { if (altName.get(0).equals(GeneralName.rfc822Name)) {
if (altName.get(1) instanceof String) if (altName.get(1) instanceof String)
result.add(MessageHelper.fromPunyCode((String) altName.get(1))); result.add((String) altName.get(1));
} else if (altName.get(0).equals(GeneralName.otherName)) { } else if (altName.get(0).equals(GeneralName.otherName)) {
if (altName.get(1) instanceof byte[]) if (altName.get(1) instanceof byte[])
try { try {
@ -206,7 +206,7 @@ public class EntityCertificate {
int at = otherName.indexOf('@'); int at = otherName.indexOf('@');
int dot = otherName.lastIndexOf('.'); int dot = otherName.lastIndexOf('.');
if (at >= 0 && dot > at) // UTF-8 accepted, so basic test only if (at >= 0 && dot > at) // UTF-8 accepted, so basic test only
result.add(MessageHelper.fromPunyCode(otherName)); result.add(otherName);
else else
Log.w("Ignoring otherName=" + otherName); Log.w("Ignoring otherName=" + otherName);
} catch (Throwable ex) { } catch (Throwable ex) {
@ -234,7 +234,7 @@ public class EntityCertificate {
continue; continue;
if (!Helper.EMAIL_ADDRESS.matcher(email).matches()) if (!Helper.EMAIL_ADDRESS.matcher(email).matches())
continue; continue;
result.add(MessageHelper.fromPunyCode(email)); result.add(email);
} }
} }
} catch (Throwable ex) { } catch (Throwable ex) {

Loading…
Cancel
Save