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

checkServerIdentity What does it look at?

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: MongoDB 3.2
    • Labels:
    • Environment:
      node.js

      Description

      When using ssl I get `failed to connect to server [127.0.0.1:27017] on first connect` unless I remove checkServerIdentity:true from the serveroptions on node.js mongodb 2.2.4

      What file is it checking?

      require(__dirname+'/../node_modules/mongodb').MongoClient.connect(
      'mongodb://user:pass@127.0.0.1:27017/db?ssl=true&authMechanism=SCRAM-SHA-1&authSource=db'
      , {server:{
      sslValidate:true
      //, checkServerIdentity:true
      , sslCA:[require('fs').readFileSync('/etc/letsencrypt/identrust-root-download-x3.pem')]
      , sslKey:require('fs').readFileSync('/etc/letsencrypt/live/example.com/privkey.pem')
      , sslCert:require('fs').readFileSync('/etc/letsencrypt/live/example.com/mongod-sslCert.pem')
      }}
      , function(e,db)

      { console.log(e,db); }

      );

        Attachments

          Activity

            People

            Assignee:
            lucas.hrabovsky Lucas Hrabovsky (Inactive)
            Reporter:
            benzmuircroft@gmail.com Benz Muircroft
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: