Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-402

Can't make ssl connection - UNABLE_TO_VERIFY_LEAF_SIGNATURE

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.24
    • Component/s: None
    • Labels:
    • Environment:
      node: v0.10.26
      os: darwin x64

      We have ssl-enabled replica set and were connection with driver 1.4.19 without problems

      var db = require('mongodb').Db;
      
      var url = 'mongodb://user:pwd@host1,host2/database?ssl=true';
      
      var opts = {
      		replSet: {
      			replicaSet: 'rs1'
      		}
      	};
      
      db.connect(url, opts, function(err, db) {
      	console.log(err, db);
      });
      
      

      I'm getting an error if I connect with the same options with driver 2.0.24

      var client = require('mongodb').MongoClient;
      
      var url = 'mongodb://user:pwd@host1,host2/database?ssl=true';
      
      var opts = {
      		replSet: {
      			replicaSet: 'set-5241a5bf48a7a21be300033c'
      		}
      	};
      
      client.connect(url, opts, function(err, db) {
      	console.log(err, db);
      });
      
      result:
      
      { name: 'MongoError',
        message: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' } null
      
      

      What is the trick to make it work?

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            a.bubenshchykov@gmail.com Alex Bub
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: