Allow SSLContext instance to be reused between env
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:/
'ssl': {
'ca_file': '/my/private/
'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:/
'ssl': {
'context': <SSLContext instance>,
}
}
Related branches
- James Raymond: Approve
-
Diff: 43 lines (+22/-0)2 files modifiedmicrofiber.py (+8/-0)
test_microfiber.py (+14/-0)
Changed in microfiber: | |
status: | In Progress → Fix Committed |
Changed in microfiber: | |
status: | Fix Committed → Fix Released |