mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-05 05:46:44 +00:00
shorten mitm message to avoid alert height ellipsis
This commit is contained in:
parent
19637fd706
commit
10514b8039
1 changed files with 4 additions and 4 deletions
|
@ -221,14 +221,14 @@ public class AppServices {
|
||||||
if(tlsServerException.getCause().getMessage().contains("PKIX path building failed")) {
|
if(tlsServerException.getCause().getMessage().contains("PKIX path building failed")) {
|
||||||
File crtFile = Config.get().getElectrumServerCert();
|
File crtFile = Config.get().getElectrumServerCert();
|
||||||
if(crtFile != null && Config.get().getServerType() == ServerType.ELECTRUM_SERVER) {
|
if(crtFile != null && Config.get().getServerType() == ServerType.ELECTRUM_SERVER) {
|
||||||
AppServices.showErrorDialog("SSL Handshake Failed", "The configured server certificate at " + crtFile.getAbsolutePath() + " did not match the certificate provided by the server at " + tlsServerException.getServer().getHost() + "." +
|
AppServices.showErrorDialog("SSL Handshake Failed", "The configured server certificate at " + crtFile.getAbsolutePath() + " did not match the certificate provided by the server at " + tlsServerException.getServer().getHost() + ". " +
|
||||||
"\n\nThis may indicate a man-in-the-middle attack!" +
|
"This may indicate a man-in-the-middle attack!" +
|
||||||
"\n\nChange the configured server certificate if you would like to proceed.");
|
"\n\nChange the configured server certificate if you would like to proceed.");
|
||||||
} else {
|
} else {
|
||||||
crtFile = Storage.getCertificateFile(tlsServerException.getServer().getHost());
|
crtFile = Storage.getCertificateFile(tlsServerException.getServer().getHost());
|
||||||
if(crtFile != null) {
|
if(crtFile != null) {
|
||||||
Optional<ButtonType> optButton = AppServices.showErrorDialog("SSL Handshake Failed", "The certificate provided by the server at " + tlsServerException.getServer().getHost() + " appears to have changed." +
|
Optional<ButtonType> optButton = AppServices.showErrorDialog("SSL Handshake Failed", "The certificate provided by the server at " + tlsServerException.getServer().getHost() + " appears to have changed. " +
|
||||||
"\n\nThis may indicate a man-in-the-middle attack!" +
|
"This may indicate a man-in-the-middle attack!" +
|
||||||
"\n\nDo you still want to proceed?", ButtonType.NO, ButtonType.YES);
|
"\n\nDo you still want to proceed?", ButtonType.NO, ButtonType.YES);
|
||||||
if(optButton.isPresent() && optButton.get() == ButtonType.YES) {
|
if(optButton.isPresent() && optButton.get() == ButtonType.YES) {
|
||||||
crtFile.delete();
|
crtFile.delete();
|
||||||
|
|
Loading…
Reference in a new issue