From 0ef595f1d9b5336872dc24d7d67c8cd127b31cea Mon Sep 17 00:00:00 2001 From: Andre Caron Date: Mon, 18 May 2015 13:53:43 -0400 Subject: Adds CSR builder. --- docs/x509.rst | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'docs') diff --git a/docs/x509.rst b/docs/x509.rst index b8e3c8ee..8507edc1 100644 --- a/docs/x509.rst +++ b/docs/x509.rst @@ -468,6 +468,47 @@ X.509 Revoked Certificate Object The extensions encoded in the revoked certificate. +X.509 CSR (Certificate Signing Request) Builder Object +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. class:: CertificateSigningRequestBuilder + + .. method:: __init__() + + Creates an empty certificate signing request. + + .. method:: set_version(version) + + :param version: The :class:`Version` of the X.509 protocol. + + .. method:: set_subject_name(name) + + :param name: The :class:`Name` of the certificate subject. + + .. method:: add_extension(extension) + + :param extension: The :class:`Extension` to add to the request. + + .. method:: sign(backend, private_key, algorithm) + + :param backend: Backend that will be used to sign the request. + Must support the + :class:`~cryptography.hazmat.backends.interfaces.X509Backend` + interface. + + :param private_key: The + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey` + that will be used to sign the request. When the request is + signed by a certificate authority, the private key's associated + public key will be stored in the resulting certificate. + + :param algorithm: The + :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm` + that will be used to generate the request signature. + + :type: :class:`CertificateSigningRequest` + + .. class:: Name .. versionadded:: 0.8 -- cgit v1.2.3