curl: (60) SSL: no alternative certificate subject name matches target host name
I don't understand this error. If I supply a CA certificate (with --cacert
option), it doesn't even have a subject alternative name. And if it had one, it wouldn't match the target host name (my server) for sure.
If I, on the other hand, supply my server certificate, signed with the CA, it says: SSL certificate problem: unable to get local issuer certificate.
(That I would expect, because my computer does not trust the CA by default and that's correct.)
When combining the PEM certificates in one file, I get the same errors.
Using option --capath
set to the directory with both server and CA certificates it says: curl: (60) SSL certificate problem: unable to get local issuer certificate
again.
How do I make the trust check work?
(It worked when using a single self-signed server certificate.)