I'm a bit of a beginner with this so I'm looking for more of an explanation rather than a quick fix.
I am trying to deploy a Spring Boot app over HTTPS (for fun/testing, will never make it into production). I first started by creating a Certificate Authority (root and intermediary) and then creating a certificate for my application (which will be accessed via localhost) and using the intermediate CA to sign this certificate. I used this tutorial to do this.
I then used this answer to import my newly created localhost certificate into a keystore and then deployed by application. When accessed through Chrome I was presented with two issues;
Subject Alternative Name missing. The certificate for this site does not contain a Subject Alternative Name extension containing a domain name or IP address.
Certificate error. There are issues with the site's certificate chain (net::ERR_CERT_AUTHORITY_INVALID).
Now if my understanding of the problems is correct, I would need to do the following;
The SAN is some sort of certificate extension which has succeeded the common name matching the domain name. I would need to inject this extension into my localhost certificate. My problem is that I am not sure where I have to do this. Is it upon creation of the certificate?
I'm not sure why this is happening. From one end I feel that this will always happen since my CA is one I created and not an established CA, but from what I see online this can be solved, but I don't understand how. I just injected my localhost certificate into the keystore. Would I need to inject the intermediate certificate too?
Also, I have a question regarding the tutorial above. What is the difference between server_cert and usr_cert (under the Sign server and client certificates section). The certificate is the server's certificate but it will handle user authentication. In that case I would need to use server_cert right?