Skip to content

Commit

Permalink
minor acme doc & comment fixes (#10122)
Browse files Browse the repository at this point in the history
this fixes two tiny things i noticed when reviewing
#10120

1. not all of our `acme` modules were generating API documentation
2. the deleted commend about a "type ignore" should have been deleted in
#9197 but will and i missed it
  • Loading branch information
bmw authored Jan 7, 2025
1 parent 9148acd commit d3d2932
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 0 additions & 2 deletions acme/acme/challenges.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,6 @@ def verify_cert(self, domain: str, cert: Union[x509.Certificate, crypto.X509]) -
names = crypto_util.get_names_from_subject_and_extensions(
cert.subject, cert.extensions
)
# Type ignore needed due to
# https://github.com/pyca/pyopenssl/issues/730.
logger.debug(
"Certificate %s. SANs: %s", cert.fingerprint(hashes.SHA256()), names
)
Expand Down
8 changes: 6 additions & 2 deletions acme/acme/crypto_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,18 @@ def make_csr(
) -> bytes:
"""Generate a CSR containing domains or IPs as subjectAltNames.
Parameters are ordered this way for backwards compatibility when called using positional
arguments.
:param buffer private_key_pem: Private key, in PEM PKCS#8 format.
:param list domains: List of DNS names to include in subjectAltNames of CSR.
:param bool must_staple: Whether to include the TLS Feature extension (aka
OCSP Must Staple: https://tools.ietf.org/html/rfc7633).
:param list ipaddrs: List of IPaddress(type ipaddress.IPv4Address or ipaddress.IPv6Address)
names to include in subbjectAltNames of CSR.
params ordered this way for backward competablity when called by positional argument.
names to include in subbjectAltNames of CSR.
:returns: buffer PEM-encoded Certificate Signing Request.
"""
private_key = serialization.load_pem_private_key(private_key_pem, password=None)
# There are a few things that aren't valid for x509 signing. mypy
Expand Down
5 changes: 5 additions & 0 deletions acme/docs/api/crypto_util.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Crypto_util
-----------

.. automodule:: acme.crypto_util
:members:
5 changes: 5 additions & 0 deletions acme/docs/api/jws.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
JWS
---

.. automodule:: acme.jws
:members:
5 changes: 5 additions & 0 deletions acme/docs/api/util.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Util
----

.. automodule:: acme.util
:members:

0 comments on commit d3d2932

Please sign in to comment.