Quantcast
Viewing all articles
Browse latest Browse all 1529

problem with ssl in macos (laptop early 2015)

i am developing a Spring boot application, with a reactjs frontend. The backend is secured with Spring security and jwt. The jwt has to be stored in a httponly cookie, therefore i must enable SSL communication, otherwise, i cannot store the jwt token in a httpOnly cookie.

i generated a p12 selfsigned certificate with openssl (default one) via a line similar to this :

openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -keyout private.key -out certificate.crt && openssl pkcs12 -export -out keystore.p12 -inkey private.key -in certificate.crt

after that i added the following settings to application.properties :

server.ssl.key-store=classpath:keystore.p12server.ssl.key-store-password=<password>server.ssl.key-store-type=PKCS12server.ssl.key-alias=springboot

Of course i added the certificate to the keystore of macos and set tze trust to ALWAYS (i am using an old macbook : macbook air early 2015 and i think this is the cause of the problem).

By the way the "keytool" command generates a certificate that will NOT be recognized by the keystore of macos (ot tells always that the certificate's password is wrong).

Now when trying accessing the spring boot api with Postman via https it works fine. But the problem is with the browser (chrome, safari, firefox and duckduckgo), when trying logging in for example via chrome it tells me : COMMON NAME NOT VALID, with firefox and safari 401 unauthorized, with duckduckgo gives a CORS error, which is funny.

My question is, is the root cause that my macos (monterrey) is not able to generate a certificate (root certificate) recognized by modern browsers?

Thanks


Viewing all articles
Browse latest Browse all 1529

Trending Articles



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