diff options
| author | Steven Fackler <[email protected]> | 2016-11-04 16:32:20 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-11-04 17:16:59 -0700 |
| commit | 01ae978db0dc8620b2cc754c0d5cf94a68c1f549 (patch) | |
| tree | bc9a3bc83a1efe4853628a1c56eca8af75e079c9 /openssl/src/pkey.rs | |
| parent | Make utility functions private (diff) | |
| download | rust-openssl-01ae978db0dc8620b2cc754c0d5cf94a68c1f549.tar.xz rust-openssl-01ae978db0dc8620b2cc754c0d5cf94a68c1f549.zip | |
Get rid of Ref
There's unfortunately a rustdoc bug that causes all methods implemented
for any Ref<T> to be inlined in the deref methods section :(
Diffstat (limited to 'openssl/src/pkey.rs')
| -rw-r--r-- | openssl/src/pkey.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openssl/src/pkey.rs b/openssl/src/pkey.rs index 4885ad3c..a1b90a86 100644 --- a/openssl/src/pkey.rs +++ b/openssl/src/pkey.rs @@ -6,14 +6,14 @@ use ffi; use {cvt, cvt_p}; use bio::{MemBio, MemBioSlice}; use dsa::Dsa; -use rsa::Rsa; +use rsa::{Rsa, RsaRef}; use error::ErrorStack; use util::{CallbackState, invoke_passwd_cb}; -use types::{OpenSslType, Ref}; +use types::{OpenSslType, OpenSslTypeRef}; -type_!(PKey, ffi::EVP_PKEY, ffi::EVP_PKEY_free); +type_!(PKey, PKeyRef, ffi::EVP_PKEY, ffi::EVP_PKEY_free); -impl Ref<PKey> { +impl PKeyRef { /// Get a reference to the interal RSA key for direct access to the key components pub fn rsa(&self) -> Result<Rsa, ErrorStack> { unsafe { @@ -58,7 +58,7 @@ impl Ref<PKey> { Ok(mem_bio.get_buf().to_owned()) } - pub fn public_eq(&self, other: &Ref<PKey>) -> bool { + pub fn public_eq(&self, other: &PKeyRef) -> bool { unsafe { ffi::EVP_PKEY_cmp(self.as_ptr(), other.as_ptr()) == 1 } } } @@ -148,7 +148,7 @@ impl PKey { } /// Assign an RSA key to this pkey. - pub fn set_rsa(&mut self, rsa: &Ref<Rsa>) -> Result<(), ErrorStack> { + pub fn set_rsa(&mut self, rsa: &RsaRef) -> Result<(), ErrorStack> { unsafe { // this needs to be a reference as the set1_RSA ups the reference count let rsa_ptr = rsa.as_ptr(); |