Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-934

Unable to specify ssl_match_hostname option using URI style connection string

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 3.0.3
    • Affects Version/s: 3.0.2
    • Component/s: None
    • None

      Using following URI

      mongodb://127.0.0.1:27017/db?replicaset=test&ssl=true&ssl_keyfile=/tmp/ssl.key&ssl_certfile=/tmp/ssl.cert&ssl_ca_certs=/tmp/ca.crt&ssl_match_hostname=false
      

      error:

        File "build/bdist.linux-x86_64/egg/pymongo/common.py", line 116, in validate_boolean
          raise TypeError("%s must be True or False" % (option,))
      TypeError: ssl_match_hostname must be True or False
      

      caused by https://github.com/mongodb/mongo-python-driver/blob/3.0.2/pymongo/common.py#L401

      validate_boolean_or_string validator should be used for option ssl_match_hostname

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            lenbuckens Len Buckens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: