diff --git a/plugins/module_utils/acme/acme.py b/plugins/module_utils/acme/acme.py index ab57e8b2..cd1cb6b3 100644 --- a/plugins/module_utils/acme/acme.py +++ b/plugins/module_utils/acme/acme.py @@ -491,7 +491,7 @@ def create_backend(module, needs_acme_v2): # Create backend object if backend == 'cryptography': if CRYPTOGRAPHY_ERROR is not None: - # Either we couldn't import cryptography at all, or there was an unexpected error + # Either we could not import cryptography at all, or there was an unexpected error if CRYPTOGRAPHY_VERSION is None: msg = missing_required_lib('cryptography') else: diff --git a/plugins/module_utils/acme/backend_openssl_cli.py b/plugins/module_utils/acme/backend_openssl_cli.py index eff6af1f..175ecfe8 100644 --- a/plugins/module_utils/acme/backend_openssl_cli.py +++ b/plugins/module_utils/acme/backend_openssl_cli.py @@ -47,7 +47,7 @@ _OPENSSL_ENVIRONMENT_UPDATE = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C', LC_CTY def _extract_date(out_text, name, cert_filename_suffix=""): try: date_str = re.search(r"\s+%s\s*:\s+(.*)" % name, out_text).group(1) - # For some reason Python's strptime() doesn't return any timezone information, + # For some reason Python's strptime() does not return any timezone information, # even though the information is there and a supported timezone for all supported # Python implementations (GMT). So we have to modify the datetime object by # replacing it by UTC. diff --git a/plugins/module_utils/acme/backends.py b/plugins/module_utils/acme/backends.py index cade5309..b5e25bb6 100644 --- a/plugins/module_utils/acme/backends.py +++ b/plugins/module_utils/acme/backends.py @@ -74,7 +74,7 @@ def _parse_acme_timestamp(timestamp_str, with_timezone): # RFC 3339 (https://www.rfc-editor.org/info/rfc3339) timestamp_str = _reduce_fractional_digits(timestamp_str) for format in ('%Y-%m-%dT%H:%M:%SZ', '%Y-%m-%dT%H:%M:%S.%fZ', '%Y-%m-%dT%H:%M:%S%z', '%Y-%m-%dT%H:%M:%S.%f%z'): - # Note that %z won't work with Python 2... https://stackoverflow.com/a/27829491 + # Note that %z will not work with Python 2... https://stackoverflow.com/a/27829491 try: result = datetime.datetime.strptime(timestamp_str, format) except ValueError: diff --git a/plugins/module_utils/crypto/cryptography_support.py b/plugins/module_utils/crypto/cryptography_support.py index 3d07b35b..b8eaa44d 100644 --- a/plugins/module_utils/crypto/cryptography_support.py +++ b/plugins/module_utils/crypto/cryptography_support.py @@ -155,7 +155,7 @@ def cryptography_get_extensions_from_cert(cert): except Exception: # In case the above method breaks, we likely have cryptography 36.0.0 or newer. - # Use it's public_bytes() feature in that case. We will later switch this around + # Use its public_bytes() feature in that case. We will later switch this around # so that this code will be the default, but for now this will act as a fallback # since it will re-serialize de-serialized data, which can be different (if the # original data was not canonicalized) from what was contained in the certificate. @@ -215,7 +215,7 @@ def cryptography_get_extensions_from_csr(csr): except Exception: # In case the above method breaks, we likely have cryptography 36.0.0 or newer. - # Use it's public_bytes() feature in that case. We will later switch this around + # Use its public_bytes() feature in that case. We will later switch this around # so that this code will be the default, but for now this will act as a fallback # since it will re-serialize de-serialized data, which can be different (if the # original data was not canonicalized) from what was contained in the CSR. diff --git a/plugins/module_utils/crypto/support.py b/plugins/module_utils/crypto/support.py index 862f5b8f..d10ef1c8 100644 --- a/plugins/module_utils/crypto/support.py +++ b/plugins/module_utils/crypto/support.py @@ -167,7 +167,7 @@ def load_privatekey(path, passphrase=None, check_passphrase=True, content=None, if passphrase is None and len(e.args) > 0 and len(e.args[0]) > 0: if e.args[0][0][2] in ('bad decrypt', 'bad password read'): # The key is obviously protected by the empty string. - # Do not do this at home (if it's possible at all)... + # Do not do this at home (if it is possible at all)... raise OpenSSLBadPassphraseError('No passphrase provided, but private key is password-protected!') elif backend == 'cryptography': try: diff --git a/plugins/modules/certificate_complete_chain.py b/plugins/modules/certificate_complete_chain.py index 021b5866..6e33009e 100644 --- a/plugins/modules/certificate_complete_chain.py +++ b/plugins/modules/certificate_complete_chain.py @@ -356,7 +356,7 @@ def main(): completed = [] occured_certificates = set([cert.cert for cert in chain]) if current.cert in roots.certificate_by_cert: - # Do not try to complete the chain when it's already ending with a root certificate + # Do not try to complete the chain when it is already ending with a root certificate current = None while current: root = roots.find_parent(current) diff --git a/plugins/modules/ecs_certificate.py b/plugins/modules/ecs_certificate.py index 0276556a..b325d614 100644 --- a/plugins/modules/ecs_certificate.py +++ b/plugins/modules/ecs_certificate.py @@ -419,7 +419,7 @@ EXAMPLES = r''' entrust_api_client_cert_key_path: /etc/ssl/entrust/ecs-client.key - name: Request a new certificate with an alternative client. Note that the - issued certificate will have it's Subject Distinguished Name use the + issued certificate will have its Subject Distinguished Name use the organization details associated with that client, rather than what is in the CSR. community.crypto.ecs_certificate: diff --git a/plugins/modules/get_certificate.py b/plugins/modules/get_certificate.py index 19e0b7af..ceb6f5b4 100644 --- a/plugins/modules/get_certificate.py +++ b/plugins/modules/get_certificate.py @@ -502,7 +502,7 @@ def main(): if get_certificate_chain: if sys.version_info < (3, 13): # The official way to access this has been added in https://github.com/python/cpython/pull/109113/files. - # We're basically doing the same for older Python versions. The internal API needed for this was added + # We are basically doing the same for older Python versions. The internal API needed for this was added # in https://github.com/python/cpython/commit/666991fc598bc312d72aff0078ecb553f0a968f1, which was first # released in Python 3.10.0. def _convert_chain(chain): diff --git a/plugins/modules/x509_crl.py b/plugins/modules/x509_crl.py index f8eb8d85..2fc71c24 100644 --- a/plugins/modules/x509_crl.py +++ b/plugins/modules/x509_crl.py @@ -704,7 +704,7 @@ class CRL(OpenSSLObject): if entry['issuer'] is not None: # Normalize to IDNA. If this is used-provided, it was already converted to # IDNA (by cryptography_get_name) and thus the `idna` library is present. - # If this is coming from cryptography and isn't already in IDNA (i.e. ascii), + # If this is coming from cryptography and is not already in IDNA (i.e. ascii), # cryptography < 2.1 must be in use, which depends on `idna`. So this should # not require `idna` except if it was already used by code earlier during # this invocation.