aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/x509/extensions.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2017-09-22 21:29:36 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2017-09-22 09:29:36 -0400
commit5e3cc98473ad54db390736ac81bb74210e85056d (patch)
treed8e0d5e03aee005dc0205661e55d785625b9a71f /src/cryptography/x509/extensions.py
parent2fc5849960032a246f869ed1a5d7597d64169cfa (diff)
downloadcryptography-5e3cc98473ad54db390736ac81bb74210e85056d.tar.gz
cryptography-5e3cc98473ad54db390736ac81bb74210e85056d.tar.bz2
cryptography-5e3cc98473ad54db390736ac81bb74210e85056d.zip
support delta crl indicator extension (#3936)
This is an extension for CRLs
Diffstat (limited to 'src/cryptography/x509/extensions.py')
-rw-r--r--src/cryptography/x509/extensions.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/cryptography/x509/extensions.py b/src/cryptography/x509/extensions.py
index 442000e3..beb20bad 100644
--- a/src/cryptography/x509/extensions.py
+++ b/src/cryptography/x509/extensions.py
@@ -376,6 +376,34 @@ class BasicConstraints(object):
@utils.register_interface(ExtensionType)
+class DeltaCRLIndicator(object):
+ oid = ExtensionOID.DELTA_CRL_INDICATOR
+
+ def __init__(self, crl_number):
+ if not isinstance(crl_number, six.integer_types):
+ raise TypeError("crl_number must be an integer")
+
+ self._crl_number = crl_number
+
+ crl_number = utils.read_only_property("_crl_number")
+
+ def __eq__(self, other):
+ if not isinstance(other, DeltaCRLIndicator):
+ return NotImplemented
+
+ return self.crl_number == other.crl_number
+
+ def __ne__(self, other):
+ return not self == other
+
+ def __hash__(self):
+ return hash(self.crl_number)
+
+ def __repr__(self):
+ return "<DeltaCRLIndicator(crl_number={0.crl_number})>".format(self)
+
+
+@utils.register_interface(ExtensionType)
class CRLDistributionPoints(object):
oid = ExtensionOID.CRL_DISTRIBUTION_POINTS