Fix typos
This commit is contained in:
parent
af0c36a22f
commit
4d1b7fc816
|
|
@ -91,7 +91,7 @@ foreign_type_and_impl_send_sync! {
|
||||||
/// with [`new`]. Perform standard mathematics on large numbers using
|
/// with [`new`]. Perform standard mathematics on large numbers using
|
||||||
/// methods from [`Dref<Target = BigNumRef>`]
|
/// methods from [`Dref<Target = BigNumRef>`]
|
||||||
///
|
///
|
||||||
/// OpenSSL documenation at [`BN_new`].
|
/// OpenSSL documentation at [`BN_new`].
|
||||||
///
|
///
|
||||||
/// [`new`]: struct.BigNum.html#method.new
|
/// [`new`]: struct.BigNum.html#method.new
|
||||||
/// [`Dref<Target = BigNumRef>`]: struct.BigNum.html#deref-methods
|
/// [`Dref<Target = BigNumRef>`]: struct.BigNum.html#deref-methods
|
||||||
|
|
|
||||||
|
|
@ -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
|
/// 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
|
/// fields use the formula `y^2 + xy = x^3 + ax^2 + b`. Named curves have
|
||||||
/// assured security. To prevent accidental vulnerabilities, they should
|
/// assured security. To prevent accidental vulnerabilities, they should
|
||||||
/// be prefered.
|
/// be preferred.
|
||||||
///
|
///
|
||||||
/// [wiki]: https://wiki.openssl.org/index.php/Command_Line_Elliptic_Curve_Operations
|
/// [wiki]: https://wiki.openssl.org/index.php/Command_Line_Elliptic_Curve_Operations
|
||||||
/// [`Nid`]: ../nid/index.html
|
/// [`Nid`]: ../nid/index.html
|
||||||
|
|
@ -622,7 +622,7 @@ where
|
||||||
|
|
||||||
/// Checks the key for validity.
|
/// 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
|
/// [`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> {
|
pub fn check_key(&self) -> Result<(), ErrorStack> {
|
||||||
|
|
@ -648,7 +648,7 @@ impl EcKey<Params> {
|
||||||
/// It will not have an associated public or private key. This kind of key is primarily useful
|
/// 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`.
|
/// 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
|
/// [`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> {
|
pub fn from_curve_name(nid: Nid) -> Result<EcKey<Params>, ErrorStack> {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
//!
|
//!
|
||||||
//! # Examples
|
//! # 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:
|
//! values:
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
|
|
@ -44,7 +44,7 @@ use libc::size_t;
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # 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:
|
/// values:
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
|
|
||||||
|
|
@ -424,7 +424,7 @@ impl PKey<Private> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Deserializes a DER-formatted PKCS#8 private key, using a callback to retrieve the password
|
/// 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
|
/// The callback should copy the password into the provided buffer and return the number of
|
||||||
/// bytes written.
|
/// bytes written.
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,7 @@ unsafe impl Sync for SslMethod {}
|
||||||
unsafe impl Send for SslMethod {}
|
unsafe impl Send for SslMethod {}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
/// Options controling the behavior of certificate verification.
|
/// Options controlling the behavior of certificate verification.
|
||||||
#[derive(Debug, PartialEq, Eq, Clone, Copy, PartialOrd, Ord, Hash)]
|
#[derive(Debug, PartialEq, Eq, Clone, Copy, PartialOrd, Ord, Hash)]
|
||||||
pub struct SslVerifyMode: i32 {
|
pub struct SslVerifyMode: i32 {
|
||||||
/// Verifies that the peer's certificate is trusted.
|
/// Verifies that the peer's certificate is trusted.
|
||||||
|
|
@ -489,7 +489,7 @@ impl AlpnError {
|
||||||
pub struct SelectCertError(ffi::ssl_select_cert_result_t);
|
pub struct SelectCertError(ffi::ssl_select_cert_result_t);
|
||||||
|
|
||||||
impl SelectCertError {
|
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);
|
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.
|
/// The operation could not be completed and should be retried later.
|
||||||
|
|
@ -3512,7 +3512,7 @@ impl<S: Read + Write> SslStream<S> {
|
||||||
///
|
///
|
||||||
/// [`SSL_read`]: https://www.openssl.org/docs/manmaster/man3/SSL_read.html
|
/// [`SSL_read`]: https://www.openssl.org/docs/manmaster/man3/SSL_read.html
|
||||||
pub fn ssl_read(&mut self, buf: &mut [u8]) -> Result<usize, Error> {
|
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
|
// zero-length write. OpenSSL will likely correctly report back to us
|
||||||
// that it read zero bytes, but zero is also the sentinel for "error".
|
// that it read zero bytes, but zero is also the sentinel for "error".
|
||||||
// To avoid that confusion short-circuit that logic and return quickly
|
// 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);
|
pub struct PrivateKeyMethodError(ffi::ssl_private_key_result_t);
|
||||||
|
|
||||||
impl PrivateKeyMethodError {
|
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);
|
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.
|
/// The operation could not be completed and should be retried later.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue