[issue29470] ssl: SNI callbacks should not modify context objects

2017-09-06 Thread Christian Heimes
Christian Heimes added the comment: OK, let's update the documentation with a better example. Are you still interested to contribute a simple example? -- assignee: christian.heimes -> docs@python components: +Documentation -SSL nosy: +docs@python resolution: not a bug -> type: crash ->

[issue29470] ssl: SNI callbacks should not modify context objects

2017-02-15 Thread David Ford (FirefighterBlu3)
David Ford (FirefighterBlu3) added the comment: yes, after i've modified my tool and ensured i know the correct way of doing it. one of the problems i'm dealing with is not carting around a global variable holding prebuilt contexts. i find it unappealing. -- __

[issue29470] ssl: SNI callbacks should not modify context objects

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: David Ford: would you mind to directly propose a doc patch? -- ___ Python tracker ___ ___ Python-bug

[issue29470] ssl: SNI callbacks should not modify context objects

2017-02-15 Thread David Ford (FirefighterBlu3)
David Ford (FirefighterBlu3) added the comment: @Christian, that was years ago and there were few examples available of people that had tried to make an SNI capable server. in several cases, people were monkey patching to make a callback. .set_servername_callback() didn't formally show up in s

[issue29470] ssl: SNI callbacks should not modify context objects

2017-02-15 Thread Christian Heimes
Christian Heimes added the comment: It's not a bug in Python's ssl module. If I understand David's approach correctly, then he is using the SNI callback the wrong way. By using it the wrong way he has discovered a threading bug in OpenSSL. There is some kind of race condition going on in which

[issue29470] ssl: SNI callbacks should not modify context objects

2017-02-15 Thread STINNER Victor
Changes by STINNER Victor : -- title: [python] Error in `/usr/bin/python': free(): invalid size: 0x7f628400d0e0; ssl SNI callbacks should not modify context objects -> ssl: SNI callbacks should not modify context objects ___ Python tracker