I'm trying to access my Spring Boot application running on Netty via https in localhost, using a self signed certificate on server side.
My application.properties
looks like this:
server.ssl.enabled=true
server.ssl.key-store-type=JKS
server.ssl.key-store=test.jks
server.ssl.key-store-password=password
server.ssl.key-alias=testkey
I've generated the keystore via:
keytool -genkeypair -alias testkey -keyalg RSA -keysize 4096 -keystore test.jks -validity 36500
I'm getting the following error:
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:472) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
I tried to import the certificate to the JDK truststore, even to the OS but still the same. One source suggested to name the key alias as "testkey" to make it work, which didn't work either. Since there are no other mentions of this error in Google, I'm hoping you could help.