From 985457e57bfde52d3702dea4e500a1b54ea1c745 Mon Sep 17 00:00:00 2001 From: ohemorange Date: Mon, 6 Jan 2025 14:37:29 -0800 Subject: [PATCH] Add docstring for `acme.crypto_util.get_names_from_subject_and_extensions` (#10115) It was my oversight to not request this when this function was made public in https://github.com/certbot/certbot/pull/10111. --- acme/acme/crypto_util.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/acme/acme/crypto_util.py b/acme/acme/crypto_util.py index 967130a76..ffd8a40fa 100644 --- a/acme/acme/crypto_util.py +++ b/acme/acme/crypto_util.py @@ -307,6 +307,14 @@ def get_names_from_subject_and_extensions( subject: x509.Name, exts: x509.Extensions ) -> List[str]: """Gets all DNS SAN names as well as the first Common Name from subject. + + :param subject: Name of the x509 object, which may include Common Name + :type subject: `cryptography.x509.Name` + :param exts: Extensions of the x509 object, which may include SANs + :type exts: `cryptography.x509.Extensions` + + :returns: List of DNS Subject Alternative Names and first Common Name + :rtype: `list` of `str` """ # We know these are always `str` because `bytes` is only possible for # other OIDs.