When we need to call an internal domain via HTTPS, Java doesn't allow it because it doesn't recognize the certificate that those domain web servers are sending (probably because those certificates are self-signed given that these domains are internal to the organization).
In that case, we're asked to import those certificates. But isn't the cacert
location only there for storing root certificates and not self-signed certificates? I mean, the general procedure is that the certificate issuer's CA certificate is located in cacert
and then the signature is verified using this certificate issuer's public key. Is the process changed when a self-signed certificate is received?
Or do I have to become my own Certification Authority which would probably require generating a new key pair, then sign the self-signed certificate with my private key, create a CA certificate containing my public key, and then install this certificate in cacerts
?