support extensions in the OCSP request builder (#4481)
* support extensions in the OCSP request builder
* cover a missed branch
* refactor to use new func
* review feedback
diff --git a/docs/x509/ocsp.rst b/docs/x509/ocsp.rst
index bf06413..528502a 100644
--- a/docs/x509/ocsp.rst
+++ b/docs/x509/ocsp.rst
@@ -133,6 +133,16 @@
:class:`~cryptography.hazmat.primitives.hashes.SHA384`, and
:class:`~cryptography.hazmat.primitives.hashes.SHA512` are allowed.
+ .. method:: add_extension(extension, critical)
+
+ Adds an extension to the request.
+
+ :param extension: An extension conforming to the
+ :class:`~cryptography.x509.ExtensionType` interface.
+
+ :param critical: Set to ``True`` if the extension must be understood and
+ handled.
+
.. method:: build()
:returns: A new :class:`~cryptography.x509.ocsp.OCSPRequest`.