From 0c07580a216d4b75bfdca22254803cf48c602079 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sun, 7 Oct 2018 10:10:09 +0800 Subject: 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 --- docs/x509/ocsp.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/x509') diff --git a/docs/x509/ocsp.rst b/docs/x509/ocsp.rst index bf064134..528502a7 100644 --- a/docs/x509/ocsp.rst +++ b/docs/x509/ocsp.rst @@ -133,6 +133,16 @@ Creating Requests :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`. -- cgit v1.2.3