Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1818

Trying to download and setup the certificate from a remote SSL address for WebSocket connection but getting a "Signature does not match" exception

$
0
0

First I downloaded the certificate with:

echo "" | openssl s_client -connect io.lightstream.bitflyer.com:443 -showcerts 2>/dev/null | openssl x509 -out bitflyer.cer

Then I imported the certificate into a keychain:

keytool -import -file bitflyer.cer -alias bitflyer -keystore bitflyer.jks -storepass "abc123" -keypass "abc123"

So I'm trying to connect to io.lightstream.bitflyer.com:443. Below my full handshake:

Sending HTTP handshake! req=GET / HTTP/1.1Host: io.lightstream.bitflyer.comConnection: UpgradePragma: no-cacheCache-Control: no-cacheUpgrade: websocketSec-WebSocket-Key: 0enPg4mnHvLcT6s7+4mEGA==Origin: http://www.websocket.orgSec-WebSocket-Version: 13

But then I get:

Caused by: sun.security.validator.ValidatorException: Certificate signature validation failed    at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:215)    at sun.security.validator.Validator.validate(Validator.java:262)    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:289)    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:144)    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1626)    ... 16 moreCaused by: java.security.SignatureException: Signature does not match.    at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:449)    at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:392)    at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:213)    ... 21 more

Any ideas what am I doing wrong or how to debug that? Thanks!


Viewing all articles
Browse latest Browse all 1818

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>