mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 13:16:44 +00:00
avoid saving certificates for public servers
This commit is contained in:
parent
37af663511
commit
55d5a97d99
1 changed files with 5 additions and 4 deletions
|
@ -117,11 +117,12 @@ public class TcpOverTlsTransport extends TcpTransport {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean shouldSaveCertificate() {
|
protected boolean shouldSaveCertificate() {
|
||||||
//Avoid saving the certificates for blockstream.info public servers - they change too often and encourage approval complacency
|
//Avoid saving the certificates for public servers - they change often, encourage approval complacency, and there is little a user can do to check
|
||||||
if(PublicElectrumServer.BLOCKSTREAM_INFO.getServer().getHost().equals(server.getHost())
|
for(PublicElectrumServer publicElectrumServer : PublicElectrumServer.getServers()) {
|
||||||
|| PublicElectrumServer.ELECTRUM_BLOCKSTREAM_INFO.getServer().getHost().equals(server.getHost())) {
|
if(publicElectrumServer.getServer().getHost().equals(server.getHost())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Storage.getCertificateFile(server.getHost()) == null;
|
return Storage.getCertificateFile(server.getHost()) == null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue