Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
vuittont60 authored and nox committed Dec 14, 2023
1 parent af0c36a commit 4d1b7fc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion boring/src/bn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ foreign_type_and_impl_send_sync! {
/// with [`new`]. Perform standard mathematics on large numbers using
/// methods from [`Dref<Target = BigNumRef>`]
///
/// OpenSSL documenation at [`BN_new`].
/// OpenSSL documentation at [`BN_new`].
///
/// [`new`]: struct.BigNum.html#method.new
/// [`Dref<Target = BigNumRef>`]: struct.BigNum.html#deref-methods
Expand Down
6 changes: 3 additions & 3 deletions boring/src/ec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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> {
Expand All @@ -648,7 +648,7 @@ impl EcKey<Params> {
/// 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<EcKey<Params>, ErrorStack> {
Expand Down
4 changes: 2 additions & 2 deletions boring/src/memcmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
//!
//! ```
Expand Down Expand Up @@ -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:
///
/// ```
Expand Down
2 changes: 1 addition & 1 deletion boring/src/pkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ impl PKey<Private> {
}

/// 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.
Expand Down
8 changes: 4 additions & 4 deletions boring/src/ssl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -3512,7 +3512,7 @@ impl<S: Read + Write> SslStream<S> {
///
/// [`SSL_read`]: https://www.openssl.org/docs/manmaster/man3/SSL_read.html
pub fn ssl_read(&mut self, buf: &mut [u8]) -> Result<usize, Error> {
// 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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 4d1b7fc

Please sign in to comment.