Home
last modified time | relevance | path

Searched refs:_ASN1Object (Results 1 – 2 of 2) sorted by relevance

/external/python/cpython2/Lib/
Dssl.py310 class _ASN1Object(namedtuple("_ASN1Object", "nid shortname longname oid")): class
316 return super(_ASN1Object, cls).__new__(cls, *_txt2obj(oid, name=False))
322 return super(_ASN1Object, cls).__new__(cls, *_nid2obj(nid))
328 return super(_ASN1Object, cls).__new__(cls, *_txt2obj(name, name=True))
331 class Purpose(_ASN1Object):
402 if not isinstance(purpose, _ASN1Object):
418 if not isinstance(purpose, _ASN1Object):
469 if not isinstance(purpose, _ASN1Object):
/external/python/cpython2/Lib/test/
Dtest_ssl.py614 val = ssl._ASN1Object('1.3.6.1.5.5.7.3.1')
620 self.assertIsInstance(val, ssl._ASN1Object)
621 self.assertRaises(ValueError, ssl._ASN1Object, 'serverAuth')
623 val = ssl._ASN1Object.fromnid(129)
625 self.assertIsInstance(val, ssl._ASN1Object)
626 self.assertRaises(ValueError, ssl._ASN1Object.fromnid, -1)
628 ssl._ASN1Object.fromnid(100000)
631 obj = ssl._ASN1Object.fromnid(i)
640 val = ssl._ASN1Object.fromname('TLS Web Server Authentication')
642 self.assertIsInstance(val, ssl._ASN1Object)
[all …]