[Twisted-Python] transport.getPeerCertificate in connectionMade
p.mayers at imperial.ac.uk
Mon Aug 20 07:52:04 EDT 2012
It's been my observation that this code:
def buildProtocol(self, addr):
factory = MyFactory()
ctxfact = ssl.ClientContextFactory()
reactor.connectSSL(host, port, factory, ctxfact)
...will print "None". It seems that connectSSL calls connectionMade at
TCP connection time, not when SSL has completed. This seems unintuitive
to me because I've called "connectSSL" not "connectTCP", but I guess may
be hard to fix given the way the code works?
At the very least, should this be documented?
Or could we have an interface e.g.
"""called when the SSL layer is ready"""
...and people who are interested can "implements()" it to get the callback?
More information about the Twisted-Python