'How to fix the netty SSL SSLHandshakeException exception?
In our Project, we use Netty as webserver, In spring boot project. we would like to enable HTTPS and SSL in the project. we added the certificate to the truststore by keytool.
keytool -keystore truststore.jks -import -noprompt -trustcacerts -alias "try" -file "test.cer" -keypass pass -storepass pass
Than added the keypath and keystore information in project yaml file as :
server:
ssl:
enabled: true
key-store: 'truststore.jks'
key-store-password: "pass"
key-store-type: JKS
key-alias: "try"
but eveytime we try to send request to https://127.0.0.1:8080
we get below exception :
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: error:100000ae:SSL routines:OPENSSL_internal:NO_CERTIFICATE_SET
Caused by: javax.net.ssl.SSLHandshakeException: error:100000ae:SSL routines:OPENSSL_internal:NO_CERTIFICATE_SET
Solution 1:[1]
There are two types of key store in java,
- Truststore
- Keystore
Truststore: stores all public keys that need to be added to communicate with the third-party systems. Keystore: contains the private key.
I was putting the public key in Keystore and was the problem.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | pedram ezzati |
