Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-720

Do not persist SSL streams to avoid SSL reinitialization errors

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.8
    • Affects Version/s: 1.1.7
    • Component/s: None
    • None

      This is a quick solution to address the issue described in mongodb/mongo-php-driver#328, where the extension attempts to re-initialize SSL on a persistent stream and throws.

      Note that the current socket hash only includes the host, port, and URI and may omit SSL connection options. Since it is possible for SSL options to change in subsequent Manager constructions, it is safer to avoid persisting the connection altogether. A work-around where we either allowed SSL reinitialize to fail or avoided it altogether (if it was previously performed on the socket) might mean that some SSL options could be ignored for the current construction.

      A more robust solution will be implemented in PHPC-605, when we begin persisting the entire libmongoc client structure and incorporate all of the Manager construction options (including all SSL options) into its hash.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: