From 91d7e66cd2d6d7bfb30e97ebda3837d2bf7efc15 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 9 Oct 2021 11:16:06 +0200 Subject: [PATCH] Add changelog entry and documentation. --- CHANGELOG.rst | 2 ++ docs/x509/reference.rst | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ea5ab1647173f..805b5a44dbe52 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,8 @@ Changelog :func:`~cryptography.hazmat.primitives.serialization.pkcs12.load_pkcs12`, which will return an object of type :class:`~cryptography.hazmat.primitives.serialization.pkcs12.PKCS12KeyAndCertificates`. +* Extension values can now be serialized to a DER byte string by calling + :func:`~cryptography.x509.ExtensionType.to_der_string`. .. _v35-0-0: diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst index 36dbd6db68a7a..d6e79870a844d 100644 --- a/docs/x509/reference.rst +++ b/docs/x509/reference.rst @@ -1589,6 +1589,14 @@ X.509 Extensions Returns the OID associated with the given extension type. + .. method:: to_der_string + + .. versionadded:: 36.0 + + :return bytes: + + A bytes string representing the extension's DER encoded value. + .. class:: KeyUsage(digital_signature, content_commitment, key_encipherment, data_encipherment, key_agreement, key_cert_sign, crl_sign, encipher_only, decipher_only) .. versionadded:: 0.9