Updated on 2026-08-14
This commit is contained in:
parent
46ab0d584b
commit
983278c3e1
1 changed files with 5 additions and 3 deletions
|
|
@ -112,6 +112,8 @@ public class ServerApiElectrum {
|
|||
this.host = bitcoinNodeSsl.getHost();
|
||||
this.port = bitcoinNodeSsl.getPort();
|
||||
|
||||
// System.setProperty("javax.net.debug", "ssl,handshake");
|
||||
|
||||
SocketFactory sf = SSLSocketFactory.getDefault();
|
||||
SSLSocket sslSocket;
|
||||
|
||||
|
|
@ -124,9 +126,9 @@ public class ServerApiElectrum {
|
|||
HostnameVerifier hv = HttpsURLConnection.getDefaultHostnameVerifier();
|
||||
SSLSession sslSession = sslSocket.getSession();
|
||||
|
||||
// if (!hv.verify(host, sslSession)) {
|
||||
// throw new SSLHandshakeException("Expected " + host + " , found " + sslSession.getPeerPrincipal());
|
||||
// }
|
||||
if (!hv.verify(host, sslSession)) {
|
||||
throw new SSLHandshakeException("Expected " + host + " , found " + sslSession.getPeerPrincipal());
|
||||
}
|
||||
|
||||
Log.i(TAG, host + " " + port);
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue