I am getting

SSL: error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert bad certificate" error at mongod console while connecting using ssl. and " exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {iaik.security.ssl.SSLException: Server certificate rejected by ChainVerifier}}

I am using Entrust security vendor and mongoDB 3.4 version. When I change the vendor to SUN_JSSE then its working fine and connection is established using same set of certificates which are self signed. I want to know whether mongodb uses support Entrust based ssl?

  • please write what steps you did. Did you import the Entrust Root Certificate Authority? MongoDB will work with Entrust, the Entrust Root-CA even imported in my Firefox.
    – Josefine
    Jun 19 '17 at 3:38
  • I generated Root CA certificate using open ssl ..below are the commands- genrsa -out rootCA.key 1024 req -x509 -new -nodes -key rootCA.key -config "C:/Users/ravgupta/openssl.cnf" -sha256 -days 1024 -out rootCA.pem ...... and then created server and client certificates and signed them using rootCA.pem and started mongodb server using below comand..mongod --sslMode requireSSL --sslPEMKeyFile C:/Users/ravgupta/mongoservermerge.pem --sslCAFile C:/Users/ravgupta/rootCA.pem .. here mongoservermerge.pem is the merged file which consist of server.key and server.crt
    – Ravi Gupta
    Jun 19 '17 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.