def test_unused_issuer(self):
"""
The C{issuer} parameter to L{X509Extension} may be provided for an
extension which does not use it and is ignored in this case.
"""
ext1 = X509Extension('basicConstraints', False, 'CA:TRUE', issuer=self.x509)
self.x509.add_extensions([ext1])
self.x509.sign(self.pkey, 'sha1')
text = dump_certificate(FILETYPE_TEXT, self.x509)
self.assertTrue('X509v3 Basic Constraints:' in text)
self.assertTrue('CA:TRUE' in text)
评论列表
文章目录