avoid saving certificates for public servers

This commit is contained in:
Craig Raw 2024-01-30 08:03:38 +02:00
parent 37af663511
commit 55d5a97d99

View file

@ -117,10 +117,11 @@ 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;