SSL certificate error in Mongo
This is what I did exactly to establish an SSL connection.
1 Use openssl to generate client and server key (c.pem, s.pem)
2 Use openssl to generate client key request and server key request
3 Get a CA to sign both reqs and get certificates: c.cer, s.cer
4 concatenate c.pem and c.cer and get client.pem, similarly get server.pem
Now start the server:
mongod --sslMode requireSSL --sslPEMKeyFile server.pem -sslCAFile caroot.cer
start the client:
mongo --ssl --sslCAFile caroot.cer --sslPEMKeyFile client.pem
And now I am getting the error:
E NETWORK SSL peer certificate validation failed:certificate not trusted
Any thoughts on why this isn't working?
source to share
No one has answered this question yet
Check out similar questions: