[Twisted-Python] getpeername from verify callback
Glyph
glyph at twistedmatrix.com
Fri Oct 19 00:50:13 MDT 2012
On Oct 18, 2012, at 11:36 PM, Adi Roiban <adi at roiban.ro> wrote:
> On 19 October 2012 07:41, Nathan Mower <nathanm at securitymetrics.com> wrote:
>> The following sample code worked until Twisted began to prefer memory BIOs over socket BIOs. Now it produces this error...
>>
>> exceptions.AttributeError: 'NoneType' object has no attribute 'getpeername'
>>
>> ...on line 9 where getpeername() is called by the verify() callback.
>>
>> Is there any way to obtain the peer name, given the OpenSSL.SSL.Connection object passed into verify()? Anything that surfaces the underlying socket? (Perhaps something similar to what is done in connectionMade(), which does work.) Or alternatively, is there a way to tell the reactor to employ socket BIOs?
>
> Hi
>
> I think that we are talking about this bug:
> http://twistedmatrix.com/trac/ticket/5684
Thanks for the pointer; I've just closed it with a similar answer.
-glyph
More information about the Twisted-Python
mailing list