當前位置: 首頁>>代碼示例>>Python>>正文


Python _SSLContext.__new__方法代碼示例

本文整理匯總了Python中_ssl._SSLContext.__new__方法的典型用法代碼示例。如果您正苦於以下問題:Python _SSLContext.__new__方法的具體用法?Python _SSLContext.__new__怎麽用?Python _SSLContext.__new__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在_ssl._SSLContext的用法示例。


在下文中一共展示了_SSLContext.__new__方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __new__

# 需要導入模塊: from _ssl import _SSLContext [as 別名]
# 或者: from _ssl._SSLContext import __new__ [as 別名]
def __new__(cls, oid):
        return super(_ASN1Object, cls).__new__(cls, *_txt2obj(oid, name=False)) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:4,代碼來源:ssl.py

示例2: fromnid

# 需要導入模塊: from _ssl import _SSLContext [as 別名]
# 或者: from _ssl._SSLContext import __new__ [as 別名]
def fromnid(cls, nid):
        """Create _ASN1Object from OpenSSL numeric ID
        """
        return super(_ASN1Object, cls).__new__(cls, *_nid2obj(nid)) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:6,代碼來源:ssl.py

示例3: fromname

# 需要導入模塊: from _ssl import _SSLContext [as 別名]
# 或者: from _ssl._SSLContext import __new__ [as 別名]
def fromname(cls, name):
        """Create _ASN1Object from short name, long name or OID
        """
        return super(_ASN1Object, cls).__new__(cls, *_txt2obj(name, name=True)) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:6,代碼來源:ssl.py

示例4: __new__

# 需要導入模塊: from _ssl import _SSLContext [as 別名]
# 或者: from _ssl._SSLContext import __new__ [as 別名]
def __new__(cls, oid):
        return super().__new__(cls, *_txt2obj(oid, name=False)) 
開發者ID:Microvellum,項目名稱:Fluid-Designer,代碼行數:4,代碼來源:ssl.py

示例5: fromnid

# 需要導入模塊: from _ssl import _SSLContext [as 別名]
# 或者: from _ssl._SSLContext import __new__ [as 別名]
def fromnid(cls, nid):
        """Create _ASN1Object from OpenSSL numeric ID
        """
        return super().__new__(cls, *_nid2obj(nid)) 
開發者ID:Microvellum,項目名稱:Fluid-Designer,代碼行數:6,代碼來源:ssl.py

示例6: fromname

# 需要導入模塊: from _ssl import _SSLContext [as 別名]
# 或者: from _ssl._SSLContext import __new__ [as 別名]
def fromname(cls, name):
        """Create _ASN1Object from short name, long name or OID
        """
        return super().__new__(cls, *_txt2obj(name, name=True)) 
開發者ID:Microvellum,項目名稱:Fluid-Designer,代碼行數:6,代碼來源:ssl.py

示例7: _create

# 需要導入模塊: from _ssl import _SSLContext [as 別名]
# 或者: from _ssl._SSLContext import __new__ [as 別名]
def _create(cls, incoming, outgoing, server_side=False,
                 server_hostname=None, session=None, context=None):
        self = cls.__new__(cls)
        sslobj = context._wrap_bio(
            incoming, outgoing, server_side=server_side,
            server_hostname=server_hostname,
            owner=self, session=session
        )
        self._sslobj = sslobj
        return self 
開發者ID:CedricGuillemet,項目名稱:Imogen,代碼行數:12,代碼來源:ssl.py


注:本文中的_ssl._SSLContext.__new__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。