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/dsa.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/dsa.rs')
| -rw-r--r-- | openssl/src/dsa.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/openssl/src/dsa.rs b/openssl/src/dsa.rs index 6efa7050..9dd5669c 100644 --- a/openssl/src/dsa.rs +++ b/openssl/src/dsa.rs @@ -5,14 +5,14 @@ use std::fmt; use std::ptr; use bio::{MemBio, MemBioSlice}; -use bn::BigNum; +use bn::BigNumRef; use {cvt, cvt_p}; -use types::Ref; +use types::OpenSslTypeRef; use util::{CallbackState, invoke_passwd_cb}; -type_!(Dsa, ffi::DSA, ffi::DSA_free); +type_!(Dsa, DsaRef, ffi::DSA, ffi::DSA_free); -impl Ref<Dsa> { +impl DsaRef { /// Writes an DSA private key as unencrypted PEM formatted data pub fn private_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack> { assert!(self.has_private_key()); @@ -44,35 +44,35 @@ impl Ref<Dsa> { } } - pub fn p(&self) -> Option<&Ref<BigNum>> { + pub fn p(&self) -> Option<&BigNumRef> { unsafe { let p = compat::pqg(self.as_ptr())[0]; if p.is_null() { None } else { - Some(Ref::<BigNum>::from_ptr(p as *mut _)) + Some(BigNumRef::from_ptr(p as *mut _)) } } } - pub fn q(&self) -> Option<&Ref<BigNum>> { + pub fn q(&self) -> Option<&BigNumRef> { unsafe { let q = compat::pqg(self.as_ptr())[1]; if q.is_null() { None } else { - Some(Ref::<BigNum>::from_ptr(q as *mut _)) + Some(BigNumRef::from_ptr(q as *mut _)) } } } - pub fn g(&self) -> Option<&Ref<BigNum>> { + pub fn g(&self) -> Option<&BigNumRef> { unsafe { let g = compat::pqg(self.as_ptr())[2]; if g.is_null() { None } else { - Some(Ref::<BigNum>::from_ptr(g as *mut _)) + Some(BigNumRef::from_ptr(g as *mut _)) } } } |