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

TLS ca option cannot be used as array

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.6.0
    • None
    • 2
    • Not Needed

    Description

      What problem are you facing?

      The Node.js TLS ca option can be a string, buffer, or array of string/buffer. When passing an array, the Node.js driver only picks the first value due to this line:

      https://github.com/mongodb/node-mongodb-native/blob/b0d44137e12dbed69fbc96c963dbf1da7fddbc6b/src/connection_string.ts#L561

      What driver and relevant dependency versions are you using?

      Node.js driver 4.4.0.

      Steps to reproduce?

      Create a MongoDB TLS server (or any, really), with a custom key/cert and then try to connect with the MongoDB driver’s ca option set to an array in which the corresponding CA certificate is not in first position.

      Attachments

        Issue Links

          Activity

            People

              bailey.pearson@mongodb.com Bailey Pearson
              anna.henningsen@mongodb.com Anna Henningsen
              Neal Beeken Neal Beeken
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: