aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/x509/ocsp.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2018-10-02 07:54:31 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2018-10-01 19:54:31 -0400
commita07de31096767abd3b4529ae29c0487c8f21310b (patch)
tree28eb5577ebb97209332c50b17c92e29e981ac644 /src/cryptography/x509/ocsp.py
parent1717f8c998b22fbbebec4b5514aee42fb3a2f68d (diff)
downloadcryptography-a07de31096767abd3b4529ae29c0487c8f21310b.tar.gz
cryptography-a07de31096767abd3b4529ae29c0487c8f21310b.tar.bz2
cryptography-a07de31096767abd3b4529ae29c0487c8f21310b.zip
support OCSP response parsing (#4452)
* support OCSP response parsing * move the decorator to make pep8 happy * add some missing docs * review feedback * more review feedback
Diffstat (limited to 'src/cryptography/x509/ocsp.py')
-rw-r--r--src/cryptography/x509/ocsp.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cryptography/x509/ocsp.py b/src/cryptography/x509/ocsp.py
index 7535a0b3..7907bcae 100644
--- a/src/cryptography/x509/ocsp.py
+++ b/src/cryptography/x509/ocsp.py
@@ -40,11 +40,19 @@ class OCSPCertStatus(Enum):
UNKNOWN = 2
+_CERT_STATUS_TO_ENUM = dict((x.value, x) for x in OCSPCertStatus)
+
+
def load_der_ocsp_request(data):
from cryptography.hazmat.backends.openssl.backend import backend
return backend.load_der_ocsp_request(data)
+def load_der_ocsp_response(data):
+ from cryptography.hazmat.backends.openssl.backend import backend
+ return backend.load_der_ocsp_response(data)
+
+
class OCSPRequestBuilder(object):
def __init__(self, request=None):
self._request = request