aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-10-15 19:14:41 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-10-15 19:14:41 +0200
commitfc96dcaa4d1b053b547ba35215d492b32442e929 (patch)
treec0738ac8c2c2ba75f3de8faad8d13cc0378f7950 /src/main/java/eu
parent5b271e1ed8b4b51f4bddc1cf088ebb80d51e5566 (diff)
use constants for oids in xmppdomainverifier
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/XmppDomainVerifier.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/XmppDomainVerifier.java b/src/main/java/eu/siacs/conversations/crypto/XmppDomainVerifier.java
index f882e04e..47d4b459 100644
--- a/src/main/java/eu/siacs/conversations/crypto/XmppDomainVerifier.java
+++ b/src/main/java/eu/siacs/conversations/crypto/XmppDomainVerifier.java
@@ -27,6 +27,9 @@ public class XmppDomainVerifier implements HostnameVerifier {
private final String LOGTAG = "XmppDomainVerifier";
+ private final String SRVName = "1.3.6.1.5.5.7.8.7";
+ private final String xmppAddr = "1.3.6.1.5.5.7.8.5";
+
@Override
public boolean verify(String domain, SSLSession sslSession) {
try {
@@ -53,14 +56,14 @@ public class XmppDomainVerifier implements HostnameVerifier {
String oid = sequence.getObjectAt(0).toString();
ASN1Primitive value = ((DERTaggedObject) sequence.getObjectAt(1)).getObject();
switch (oid) {
- case "1.3.6.1.5.5.7.8.5":
+ case xmppAddr:
if (value instanceof DERUTF8String) {
xmppAddrs.add(((DERUTF8String) value).getString());
} else if (value instanceof DERIA5String) {
xmppAddrs.add(((DERIA5String) value).getString());
}
break;
- case "1.3.6.1.5.5.7.8.7":
+ case SRVName:
if (value instanceof DERUTF8String) {
srvNames.add(((DERUTF8String) value).getString());
} else if (value instanceof DERIA5String) {