本文整理汇总了Python中cryptography.x509.IssuingDistributionPoint方法的典型用法代码示例。如果您正苦于以下问题:Python x509.IssuingDistributionPoint方法的具体用法?Python x509.IssuingDistributionPoint怎么用?Python x509.IssuingDistributionPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cryptography.x509
的用法示例。
在下文中一共展示了x509.IssuingDistributionPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _decode_issuing_dist_point
# 需要导入模块: from cryptography import x509 [as 别名]
# 或者: from cryptography.x509 import IssuingDistributionPoint [as 别名]
def _decode_issuing_dist_point(backend, idp):
idp = backend._ffi.cast("ISSUING_DIST_POINT *", idp)
idp = backend._ffi.gc(idp, backend._lib.ISSUING_DIST_POINT_free)
if idp.distpoint != backend._ffi.NULL:
full_name, relative_name = _decode_distpoint(backend, idp.distpoint)
else:
full_name = None
relative_name = None
only_user = idp.onlyuser == 255
only_ca = idp.onlyCA == 255
indirect_crl = idp.indirectCRL == 255
only_attr = idp.onlyattr == 255
if idp.onlysomereasons != backend._ffi.NULL:
only_some_reasons = _decode_reasons(backend, idp.onlysomereasons)
else:
only_some_reasons = None
return x509.IssuingDistributionPoint(
full_name, relative_name, only_user, only_ca, only_some_reasons,
indirect_crl, only_attr
)
示例2: get_idp
# 需要导入模块: from cryptography import x509 [as 别名]
# 或者: from cryptography.x509 import IssuingDistributionPoint [as 别名]
def get_idp(self, full_name=None, indirect_crl=False, only_contains_attribute_certs=False,
only_contains_ca_certs=False, only_contains_user_certs=False, only_some_reasons=None,
relative_name=None):
return x509.Extension(
oid=ExtensionOID.ISSUING_DISTRIBUTION_POINT,
value=x509.IssuingDistributionPoint(
full_name=full_name,
indirect_crl=indirect_crl,
only_contains_attribute_certs=only_contains_attribute_certs,
only_contains_ca_certs=only_contains_ca_certs,
only_contains_user_certs=only_contains_user_certs,
only_some_reasons=only_some_reasons,
relative_name=relative_name
), critical=True)