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

TLS ca option cannot be used as array

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.6.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 2
    • Not Needed

      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.

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

              Created:
              Updated:
              Resolved: