Skip to content

Commit 84bf353

Browse files
author
bmukandiwa
committed
log how domain is being validated
1 parent 6433c9c commit 84bf353

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

https.android.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

https.android.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ function getClient(reload: boolean = false): okhttp3.OkHttpClient {
130130
let pp = session.getPeerPrincipal().getName();
131131
let hv = javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();
132132
if (peer.commonName && peer.commonName[0] === '*') {
133+
console.info('validate domain name with commonName');
133134
return hv.verify(peer.host, session) && hostname.indexOf(peer.host) > -1 && hostname.indexOf(session.getPeerHost()) > -1 && pp.indexOf(peer.commonName) !== -1;
134135
} else {
136+
console.info('validate domain name without commonName');
135137
return hv.verify(peer.host, session) && peer.host === hostname && peer.host === session.getPeerHost() && pp.indexOf(peer.host) !== -1;
136138
}
137139
},

0 commit comments

Comments
 (0)