From 380ba69454f55b95ea4190d4a383701b11ae23cd Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 27 Dec 2022 13:16:59 -0500 Subject: [PATCH] Typo fixes --- docs/hazmat/primitives/asymmetric/rsa.rst | 2 +- docs/hazmat/primitives/asymmetric/serialization.rst | 4 ++-- src/_cffi_src/build_openssl.py | 2 +- src/cryptography/hazmat/primitives/twofactor/hotp.py | 2 +- src/rust/src/x509/common.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst index 384cab0736e7..0bf4c0291b11 100644 --- a/docs/hazmat/primitives/asymmetric/rsa.rst +++ b/docs/hazmat/primitives/asymmetric/rsa.rst @@ -481,7 +481,7 @@ is unavailable. A keyword-only argument that defaults to ``False``. If ``True`` RSA private keys will not be validated. This significantly speeds up - loading the keys, but is is :term:`unsafe` unless you are certain + loading the keys, but is :term:`unsafe` unless you are certain the key is valid. User supplied keys should never be loaded with this parameter set to ``True``. If you do load an invalid key this way and attempt to use it OpenSSL may hang, crash, or otherwise diff --git a/docs/hazmat/primitives/asymmetric/serialization.rst b/docs/hazmat/primitives/asymmetric/serialization.rst index 0d590ad1cfe1..4d1af99425ba 100644 --- a/docs/hazmat/primitives/asymmetric/serialization.rst +++ b/docs/hazmat/primitives/asymmetric/serialization.rst @@ -149,7 +149,7 @@ all begin with ``-----BEGIN {format}-----`` and end with ``-----END A keyword-only argument that defaults to ``False``. If ``True`` RSA private keys will not be validated. This significantly speeds up - loading the keys, but is is :term:`unsafe` unless you are certain the + loading the keys, but is :term:`unsafe` unless you are certain the key is valid. User supplied keys should never be loaded with this parameter set to ``True``. If you do load an invalid key this way and attempt to use it OpenSSL may hang, crash, or otherwise misbehave. @@ -267,7 +267,7 @@ the rest. A keyword-only argument that defaults to ``False``. If ``True`` RSA private keys will not be validated. This significantly speeds up - loading the keys, but is is :term:`unsafe` unless you are certain the + loading the keys, but is :term:`unsafe` unless you are certain the key is valid. User supplied keys should never be loaded with this parameter set to ``True``. If you do load an invalid key this way and attempt to use it OpenSSL may hang, crash, or otherwise misbehave. diff --git a/src/_cffi_src/build_openssl.py b/src/_cffi_src/build_openssl.py index 0b5115fd96e5..a8e560960ebe 100644 --- a/src/_cffi_src/build_openssl.py +++ b/src/_cffi_src/build_openssl.py @@ -33,7 +33,7 @@ def _get_openssl_libraries(platform): # libssl must come before libcrypto # (https://marc.info/?l=openssl-users&m=135361825921871) # -lpthread required due to usage of pthread an potential - # existance of a static part containing e.g. pthread_atfork + # existence of a static part containing e.g. pthread_atfork # (https://github.com/pyca/cryptography/issues/5084) if sys.platform == "zos": return ["ssl", "crypto"] diff --git a/src/cryptography/hazmat/primitives/twofactor/hotp.py b/src/cryptography/hazmat/primitives/twofactor/hotp.py index 04c45bb8c6df..cbb22704bf72 100644 --- a/src/cryptography/hazmat/primitives/twofactor/hotp.py +++ b/src/cryptography/hazmat/primitives/twofactor/hotp.py @@ -56,7 +56,7 @@ def __init__( raise TypeError("Length parameter must be an integer type.") if length < 6 or length > 8: - raise ValueError("Length of HOTP has to be between 6 to 8.") + raise ValueError("Length of HOTP has to be between 6 and 8.") if not isinstance(algorithm, (SHA1, SHA256, SHA512)): raise TypeError("Algorithm must be SHA1, SHA256 or SHA512.") diff --git a/src/rust/src/x509/common.rs b/src/rust/src/x509/common.rs index fb61b7ae8aa5..b4ffc41b28fc 100644 --- a/src/rust/src/x509/common.rs +++ b/src/rust/src/x509/common.rs @@ -44,7 +44,7 @@ pub(crate) struct AttributeTypeValue<'a> { pub(crate) value: RawTlv<'a>, } -// Like `asn1::Tlv` but doesn't store `full_data` so it can be constucted from +// Like `asn1::Tlv` but doesn't store `full_data` so it can be constructed from // an un-encoded tag and value. #[derive(Hash, PartialEq, Eq, Clone)] pub(crate) struct RawTlv<'a> {