From 4d1b7fc816befbad5f00835c08ffda6ba6b54ae9 Mon Sep 17 00:00:00 2001 From: vuittont60 <81072379+vuittont60@users.noreply.github.com> Date: Thu, 7 Dec 2023 14:41:21 +0800 Subject: [PATCH] Fix typos --- boring/src/bn.rs | 2 +- boring/src/ec.rs | 6 +++--- boring/src/memcmp.rs | 4 ++-- boring/src/pkey.rs | 2 +- boring/src/ssl/mod.rs | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/boring/src/bn.rs b/boring/src/bn.rs index 6ad25782..3990048d 100644 --- a/boring/src/bn.rs +++ b/boring/src/bn.rs @@ -91,7 +91,7 @@ foreign_type_and_impl_send_sync! { /// with [`new`]. Perform standard mathematics on large numbers using /// methods from [`Dref`] /// - /// OpenSSL documenation at [`BN_new`]. + /// OpenSSL documentation at [`BN_new`]. /// /// [`new`]: struct.BigNum.html#method.new /// [`Dref`]: struct.BigNum.html#deref-methods diff --git a/boring/src/ec.rs b/boring/src/ec.rs index 9c80b2de..bbc6638d 100644 --- a/boring/src/ec.rs +++ b/boring/src/ec.rs @@ -102,7 +102,7 @@ foreign_type_and_impl_send_sync! { /// Prime fields use the formula `y^2 mod p = x^3 + ax + b mod p`. Binary /// fields use the formula `y^2 + xy = x^3 + ax^2 + b`. Named curves have /// assured security. To prevent accidental vulnerabilities, they should - /// be prefered. + /// be preferred. /// /// [wiki]: https://wiki.openssl.org/index.php/Command_Line_Elliptic_Curve_Operations /// [`Nid`]: ../nid/index.html @@ -622,7 +622,7 @@ where /// Checks the key for validity. /// - /// OpenSSL documenation at [`EC_KEY_check_key`] + /// OpenSSL documentation at [`EC_KEY_check_key`] /// /// [`EC_KEY_check_key`]: https://www.openssl.org/docs/man1.1.0/crypto/EC_KEY_check_key.html pub fn check_key(&self) -> Result<(), ErrorStack> { @@ -648,7 +648,7 @@ impl EcKey { /// It will not have an associated public or private key. This kind of key is primarily useful /// to be provided to the `set_tmp_ecdh` methods on `Ssl` and `SslContextBuilder`. /// - /// OpenSSL documenation at [`EC_KEY_new_by_curve_name`] + /// OpenSSL documentation at [`EC_KEY_new_by_curve_name`] /// /// [`EC_KEY_new_by_curve_name`]: https://www.openssl.org/docs/man1.1.0/crypto/EC_KEY_new_by_curve_name.html pub fn from_curve_name(nid: Nid) -> Result, ErrorStack> { diff --git a/boring/src/memcmp.rs b/boring/src/memcmp.rs index c00b5540..a475a4f6 100644 --- a/boring/src/memcmp.rs +++ b/boring/src/memcmp.rs @@ -12,7 +12,7 @@ //! //! # Examples //! -//! To perform a constant-time comparision of two arrays of the same length but different +//! To perform a constant-time comparison of two arrays of the same length but different //! values: //! //! ``` @@ -44,7 +44,7 @@ use libc::size_t; /// /// # Examples /// -/// To perform a constant-time comparision of two arrays of the same length but different +/// To perform a constant-time comparison of two arrays of the same length but different /// values: /// /// ``` diff --git a/boring/src/pkey.rs b/boring/src/pkey.rs index 0975b395..e1c31855 100644 --- a/boring/src/pkey.rs +++ b/boring/src/pkey.rs @@ -424,7 +424,7 @@ impl PKey { } /// Deserializes a DER-formatted PKCS#8 private key, using a callback to retrieve the password - /// if the key is encrpyted. + /// if the key is encrypted. /// /// The callback should copy the password into the provided buffer and return the number of /// bytes written. diff --git a/boring/src/ssl/mod.rs b/boring/src/ssl/mod.rs index c4a20f2e..74dc3fb0 100644 --- a/boring/src/ssl/mod.rs +++ b/boring/src/ssl/mod.rs @@ -301,7 +301,7 @@ unsafe impl Sync for SslMethod {} unsafe impl Send for SslMethod {} bitflags! { - /// Options controling the behavior of certificate verification. + /// Options controlling the behavior of certificate verification. #[derive(Debug, PartialEq, Eq, Clone, Copy, PartialOrd, Ord, Hash)] pub struct SslVerifyMode: i32 { /// Verifies that the peer's certificate is trusted. @@ -489,7 +489,7 @@ impl AlpnError { pub struct SelectCertError(ffi::ssl_select_cert_result_t); impl SelectCertError { - /// A fatal error occured and the handshake should be terminated. + /// A fatal error occurred and the handshake should be terminated. pub const ERROR: Self = Self(ffi::ssl_select_cert_result_t::ssl_select_cert_error); /// The operation could not be completed and should be retried later. @@ -3512,7 +3512,7 @@ impl SslStream { /// /// [`SSL_read`]: https://www.openssl.org/docs/manmaster/man3/SSL_read.html pub fn ssl_read(&mut self, buf: &mut [u8]) -> Result { - // The intepretation of the return code here is a little odd with a + // The interpretation of the return code here is a little odd with a // zero-length write. OpenSSL will likely correctly report back to us // that it read zero bytes, but zero is also the sentinel for "error". // To avoid that confusion short-circuit that logic and return quickly @@ -4004,7 +4004,7 @@ pub trait PrivateKeyMethod: Send + Sync + 'static { pub struct PrivateKeyMethodError(ffi::ssl_private_key_result_t); impl PrivateKeyMethodError { - /// A fatal error occured and the handshake should be terminated. + /// A fatal error occurred and the handshake should be terminated. pub const FAILURE: Self = Self(ffi::ssl_private_key_result_t::ssl_private_key_failure); /// The operation could not be completed and should be retried later.