Add a bytes method to get the DER ASN.1 encoding of an X509 name. (#3236)
* Add a bytes method to get the DER ASN.1 encoding of an X509 name.
This is useful for creating an OpenSSL style subject_name_hash (#3011)
* add to backend interface and update multibackend
* bytes -> public_bytes
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 0a0d145..942a359 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -585,6 +585,14 @@
:returns: A new instance of
:class:`~cryptography.x509.RevokedCertificate`.
+ .. method:: x509_name_bytes(name)
+
+ .. versionadded:: 1.6
+
+ :param name: An instance of :class:`~cryptography.x509.Name`.
+
+ :return bytes: The DER encoded bytes.
+
.. class:: DHBackend
.. versionadded:: 0.9