aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/hazmat/primitives/interfaces.rst6
-rw-r--r--src/cryptography/hazmat/primitives/interfaces.py6
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst
index 77aa0017..d964f25c 100644
--- a/docs/hazmat/primitives/interfaces.rst
+++ b/docs/hazmat/primitives/interfaces.rst
@@ -703,6 +703,12 @@ X509
.. versionadded:: 0.7
+ .. attribute:: version
+
+ :type: X509Version
+
+ The certificate version as an enumeration.
+
.. method:: fingerprint(algorithm)
:param algorithm: A
diff --git a/src/cryptography/hazmat/primitives/interfaces.py b/src/cryptography/hazmat/primitives/interfaces.py
index 561be972..18a62601 100644
--- a/src/cryptography/hazmat/primitives/interfaces.py
+++ b/src/cryptography/hazmat/primitives/interfaces.py
@@ -504,6 +504,12 @@ class X509Certificate(object):
Returns certificate serial number
"""
+ @abc.abstractproperty
+ def version(self):
+ """
+ Returns the certificate version
+ """
+
@abc.abstractmethod
def public_key(self):
"""