Spring WebFlux Netty SSL with self signed certificate error


Peter

I'm trying to access a Spring Boot application running on Netty via https in localhost using a self signed certificate on the server side.

Mine application.propertieslooks 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 have generated the keystore by:

keytool -genkeypair -alias testkey -keyalg RSA -keysize 4096 -keystore test.jks -validity 36500

I get the following error:

io.netty.handler.codec.DecoderException:javax.net.ssl.SSLHandshakeException:收到致命警报:io.netty.handler.codec上io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:472)上的certificate_unknown io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)上的io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)上的.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)

I've tried importing the certificate to the JDK truststore, and even to the OS, but still the same. One source suggested to name the key alias "testkey" to make it work, but that also didn't work. Since there is no other mention of this error in Google, I hope you can help.

Peter

I managed to solve it by generating a locally valid certificate using https://github.com/FiloSottile/mkcert

Related


Spring WebFlux Netty SSL with self signed certificate error

Peter I'm trying to access a Spring Boot application running on Netty via https in localhost using a self signed certificate on the server side. Mine application.propertieslooks like this: server.ssl.enabled=true server.ssl.key-store-type=JKS server.ssl.key-st

Swift SSL error with self signed certificate

Marcus Leon This code tries but fails to access the SSL URL available in the browser: let path = "https://localhost:8443/greeting" let request = NSMutableURLRequest(URL: NSURL(string: path)!) let session = NSURLSession.sharedSession() let task = session.dataT

ssl self signed certificate error - localhost

Rafał Developer I'm using this class and it's fun, but I have some questions. http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api I get a certificate error, but I know why this problem occurs. The certificate should be connected to the

Swift SSL error with self signed certificate

Marcus Leon This code tries but fails to access the SSL URL available in the browser: let path = "https://localhost:8443/greeting" let request = NSMutableURLRequest(URL: NSURL(string: path)!) let session = NSURLSession.sharedSession() let task = session.dataT

Swift SSL error with self signed certificate

Marcus Leon This code tries but fails to access the SSL URL available in the browser: let path = "https://localhost:8443/greeting" let request = NSMutableURLRequest(URL: NSURL(string: path)!) let session = NSURLSession.sharedSession() let task = session.dataT

Swift SSL error with self signed certificate

Marcus Leon This code tries but fails to access the SSL URL available in the browser: let path = "https://localhost:8443/greeting" let request = NSMutableURLRequest(URL: NSURL(string: path)!) let session = NSURLSession.sharedSession() let task = session.dataT

Swift SSL error with self signed certificate

Marcus Leon This code tries but fails to access the SSL URL available in the browser: let path = "https://localhost:8443/greeting" let request = NSMutableURLRequest(URL: NSURL(string: path)!) let session = NSURLSession.sharedSession() let task = session.dataT

ssl self signed certificate error - localhost

Rafał Developer I'm using this class and it's fun, but I have some questions. http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api I get a certificate error, but I know why this problem occurs. The certificate should be connected to the

ssl self signed certificate error - localhost

Rafał Developer I'm using this class and it's fun, but I have some questions. http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api I get a certificate error, but I know why this problem occurs. The certificate should be connected to the

Swift SSL error with self signed certificate

Marcus Leon This code tries but fails to access the SSL URL available in the browser: let path = "https://localhost:8443/greeting" let request = NSMutableURLRequest(URL: NSURL(string: path)!) let session = NSURLSession.sharedSession() let task = session.dataT

Swift SSL error with self signed certificate

Marcus Leon This code tries but fails to access the SSL URL available in the browser: let path = "https://localhost:8443/greeting" let request = NSMutableURLRequest(URL: NSURL(string: path)!) let session = NSURLSession.sharedSession() let task = session.dataT

Swift SSL error with self signed certificate

Marcus Leon This code tries but fails to access the SSL URL available in the browser: let path = "https://localhost:8443/greeting" let request = NSMutableURLRequest(URL: NSURL(string: path)!) let session = NSURLSession.sharedSession() let task = session.dataT

ssl self signed certificate error - localhost

Rafał Developer I'm using this class and it's fun, but I have some questions. http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api I get a certificate error, but I know why this problem occurs. The certificate should be connected to the

ssl self signed certificate error - localhost

Rafał Developer I'm using this class and it's fun, but I have some questions. http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api I get a certificate error, but I know why this problem occurs. The certificate should be connected to the

SSL - Self Signed Certificate with Wildcard

Niek Vandael I created a certificate with CN: *.hostname Chome and IE complain about this certificate when I navigate to dev.hostname or tst.hostname: Error in Chrome: NET::ERR_CERT_COMMON_NAME_INVALID Yes, I have added the certificate to Trusted Root CAs. Sho

SSL - Self Signed Certificate with Wildcard

Niek Vandael I created a certificate with CN: *.hostname Chome and IE complain about this certificate when I navigate to dev.hostname or tst.hostname: Error in Chrome: NET::ERR_CERT_COMMON_NAME_INVALID Yes, I have added the certificate to Trusted Root CAs. Sho

Intellij Maven repository self signed certificate, ssl error

Benno In intellij (15.0.4) under Settings -> Maven -> Repositories, I got an error when I clicked update on the company repository. org.apache.maven.wagon.TransferFailedException: sun.security.validator.ValidatorException: PKIX path build failed: sun.security.

SSL handshake error with self-signed certificate in Flutter

Armen Kh。 I'm trying to connect to a server using a self-signed certificate, but I'm getting an error: E/flutter(3781): HandshakeException: Handshake error in client (OS Error: E/flutter(3781): CERTIFICATE_VERIFY_FAILED: Hostname mismatch (ssl_cert. c:345)) co

Intellij Maven repository self signed certificate, ssl error

Benno In intellij (15.0.4) under Settings -> Maven -> Repositories, I got an error when I clicked update on the company repository. org.apache.maven.wagon.TransferFailedException: sun.security.validator.ValidatorException: PKIX path build failed: sun.security.

SSL handshake error with self-signed certificate in Flutter

Armen Kh。 I'm trying to connect to a server using a self-signed certificate, but I'm getting an error: E/flutter(3781): HandshakeException: Handshake error in client (OS Error: E/flutter(3781): CERTIFICATE_VERIFY_FAILED: Hostname mismatch (ssl_cert. c:345)) co

SSL handshake error with self-signed certificate in Flutter

Armen Kh。 I'm trying to connect to a server using a self-signed certificate, but I'm getting an error: E/flutter(3781): HandshakeException: Handshake error in client (OS Error: E/flutter(3781): CERTIFICATE_VERIFY_FAILED: Hostname mismatch (ssl_cert. c:345)) co

Intellij Maven repository self signed certificate, ssl error

Benno In intellij (15.0.4) under Settings -> Maven -> Repositories, I got an error when I clicked update on the company repository. org.apache.maven.wagon.TransferFailedException: sun.security.validator.ValidatorException: PKIX path build failed: sun.security.

SSL handshake error with self-signed certificate in Flutter

Armen Kh。 I'm trying to connect to a server using a self-signed certificate, but I'm getting an error: E/flutter(3781): HandshakeException: Handshake error in client (OS Error: E/flutter(3781): CERTIFICATE_VERIFY_FAILED: Hostname mismatch (ssl_cert. c:345)) co

Intellij Maven repository self signed certificate, ssl error

Benno In intellij (15.0.4) under Settings -> Maven -> Repositories, I got an error when I clicked update on the company repository. org.apache.maven.wagon.TransferFailedException: sun.security.validator.ValidatorException: PKIX path build failed: sun.security.

Intellij Maven repository self signed certificate, ssl error

Benno In intellij (15.0.4) under Settings -> Maven -> Repositories, I got an error when I clicked update on the company repository. org.apache.maven.wagon.TransferFailedException: sun.security.validator.ValidatorException: PKIX path build failed: sun.security.