Skip to content
Advertisement

Certificate subject for doesn’t contain a common name and does not have alternative names

I have generated a SSL self-signed certificate using the following commands one-by-one in remote ubuntu machine via terminal:

JavaScript

T I’ve added the server.crt onto my local machine’s cacerts using keytool in command prompt as admin. Also added the server.crt onto ‘Trusted Root Certification Authorities’. he issue is that HTTPS request to the remote ubuntu machine server on Postman works fine but not on IntelliJ with rest-assured as I’m getting:

javax.net.ssl.SSLException: Certificate subject for doesn’t contain a common name and does not have alternative names

Advertisement

Answer

I’ve recreated the .crt & .pfx with common name as remote ubuntu machine ip address and configured the same certificate in the app running. Now that issue has been eradicated.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement