connectionMade中twisted调用getPeerCertificate返回非

2024-09-29 23:25:48 发布

您现在位置:Python中文网/ 问答频道 /正文

在twisted中调用connectionMade中的getPeerCertificate返回None我能做什么

class Handler(Protocol):
    def dataReceived(self, data):
        print self.transport.getPeerCertificate().get_subject().commonName

    def connectionMade(self):
        print self.transport.getPeerCertificate().get_subject().commonName

Tags: selfnonegetdeftwistedprotocolclasshandler

热门问题