Allow SSLContext instance to be reused between env

Bug #1087101 reported by Jason Gerard DeRose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Microfiber
Fix Released
High
Jason Gerard DeRose

Bug Description

When Dmedia is syncing between different local devices, the SSLContext instance could be the same, and only the env['url'] would be different. As creating the SSLContext is rather expensive, it would be nice to be able to reuse it.

So I'm extending env['ssl'] to support a 'context' item, which when present should be the SSLContext instance.

Currently you can do this:

env = {
    'url': 'https://192.168.0.3:6984/',
    'ssl': {
        'ca_file': '/my/private/authority.ca',
       'key_file': '/my/client.key',
       'cert_file': '/my/client.cert',
    }
}

And I'm proposing a change that will likewise let you do this:

env = {
    'url': 'https://192.168.0.3:6984/',
    'ssl': {
        'context': <SSLContext instance>,
    }
}

Related branches

Changed in microfiber:
status: In Progress → Fix Committed
Changed in microfiber:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.