mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 12:26:45 +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,10 +117,11 @@ public class TcpOverTlsTransport extends TcpTransport {
|
|||
}
|
||||
|
||||
protected boolean shouldSaveCertificate() {
|
||||
//Avoid saving the certificates for blockstream.info public servers - they change too often and encourage approval complacency
|
||||
if(PublicElectrumServer.BLOCKSTREAM_INFO.getServer().getHost().equals(server.getHost())
|
||||
|| PublicElectrumServer.ELECTRUM_BLOCKSTREAM_INFO.getServer().getHost().equals(server.getHost())) {
|
||||
return false;
|
||||
//Avoid saving the certificates for public servers - they change often, encourage approval complacency, and there is little a user can do to check
|
||||
for(PublicElectrumServer publicElectrumServer : PublicElectrumServer.getServers()) {
|
||||
if(publicElectrumServer.getServer().getHost().equals(server.getHost())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return Storage.getCertificateFile(server.getHost()) == null;
|
||||
|
|
Loading…
Reference in a new issue