diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-11-25 08:20:59 -1000 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-11-25 08:20:59 -1000 |
commit | 244637cedae3eef1997fd2eb85c74eb3d92d52ce (patch) | |
tree | 374058210c20d1289fe287deadd1f5856407685d | |
parent | 8473df6d553a2e0bf790b613c2818beb4bd2f416 (diff) | |
download | cryptography-244637cedae3eef1997fd2eb85c74eb3d92d52ce.tar.gz cryptography-244637cedae3eef1997fd2eb85c74eb3d92d52ce.tar.bz2 cryptography-244637cedae3eef1997fd2eb85c74eb3d92d52ce.zip |
add X509Certificate version attribute
-rw-r--r-- | docs/hazmat/primitives/interfaces.rst | 6 | ||||
-rw-r--r-- | src/cryptography/hazmat/primitives/interfaces.py | 6 |
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): """ |