diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index ef1a26d5..9e17ae60 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -71,7 +71,7 @@ //! } //! ``` use ffi; -use foreign_types::{ForeignType, ForeignTypeRef}; +use foreign_types::{ForeignType, ForeignTypeRef, Opaque}; use libc::{c_int, c_void, c_long, c_ulong}; use libc::{c_uchar, c_uint}; use std::any::Any; @@ -107,7 +107,6 @@ use verify::X509VerifyParamRef; use pkey::PKeyRef; use error::ErrorStack; use ex_data::Index; -use util::Opaque; use stack::{Stack, StackRef}; use ssl::bio::BioMethod; use ssl::callbacks::*; diff --git a/openssl/src/stack.rs b/openssl/src/stack.rs index f869bdb4..d20d95f7 100644 --- a/openssl/src/stack.rs +++ b/openssl/src/stack.rs @@ -1,4 +1,4 @@ -use foreign_types::{ForeignTypeRef, ForeignType}; +use foreign_types::{ForeignTypeRef, ForeignType, Opaque}; use libc::c_int; use std::borrow::Borrow; use std::convert::AsRef; @@ -11,8 +11,6 @@ use {cvt, cvt_p}; use error::ErrorStack; use std::ops::{Deref, DerefMut, Index, IndexMut}; -use util::Opaque; - #[cfg(ossl10x)] use ffi::{sk_pop as OPENSSL_sk_pop, sk_free as OPENSSL_sk_free, sk_num as OPENSSL_sk_num, sk_value as OPENSSL_sk_value, _STACK as OPENSSL_STACK, diff --git a/openssl/src/symm.rs b/openssl/src/symm.rs index 6aed21c5..f593126a 100644 --- a/openssl/src/symm.rs +++ b/openssl/src/symm.rs @@ -358,10 +358,8 @@ impl Drop for Crypter { } } -#[doc = /** - * Encrypts data, using the specified crypter type in encrypt mode with the - * specified key and iv; returns the resulting (encrypted) data. - */] +/// Encrypts data, using the specified crypter type in encrypt mode with the +/// specified key and iv; returns the resulting (encrypted) data. pub fn encrypt( t: Cipher, key: &[u8], @@ -371,10 +369,8 @@ pub fn encrypt( cipher(t, Mode::Encrypt, key, iv, data) } -#[doc = /** - * Decrypts data, using the specified crypter type in decrypt mode with the - * specified key and iv; returns the resulting (decrypted) data. - */] +/// Decrypts data, using the specified crypter type in decrypt mode with the +/// specified key and iv; returns the resulting (decrypted) data. pub fn decrypt( t: Cipher, key: &[u8], diff --git a/openssl/src/util.rs b/openssl/src/util.rs index 58abd9ec..1093b491 100644 --- a/openssl/src/util.rs +++ b/openssl/src/util.rs @@ -91,8 +91,3 @@ where } } } - -/// This is intended to be used as the inner type for `FooRef` types converted from raw C pointers. -/// It has an `UnsafeCell` internally to inform the compiler about aliasability and doesn't -/// implement `Copy`, so it can't be dereferenced. -pub struct Opaque(UnsafeCell<()>);