Improve language.

This commit is contained in:
Felix Fontein
2024-12-28 14:30:08 +01:00
parent 91504cda85
commit 2ed7f69b83
9 changed files with 10 additions and 10 deletions

View File

@@ -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.

View File

@@ -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: