diff options
| author | Steven Fackler <[email protected]> | 2016-10-22 10:21:16 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-10-22 10:21:16 -0700 |
| commit | 3c50c74444e841c9178758fe18dcef38f56da243 (patch) | |
| tree | 15b0b4f7e10703b6583e4f4a741c0b1bba876542 /openssl/src/pkey.rs | |
| parent | Camel case Dsa (diff) | |
| download | rust-openssl-3c50c74444e841c9178758fe18dcef38f56da243.tar.xz rust-openssl-3c50c74444e841c9178758fe18dcef38f56da243.zip | |
Camel case Rsa
Diffstat (limited to 'openssl/src/pkey.rs')
| -rw-r--r-- | openssl/src/pkey.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openssl/src/pkey.rs b/openssl/src/pkey.rs index c581c980..e62bbbd9 100644 --- a/openssl/src/pkey.rs +++ b/openssl/src/pkey.rs @@ -6,7 +6,7 @@ use ffi; use {cvt, cvt_p}; use bio::{MemBio, MemBioSlice}; use dsa::Dsa; -use rsa::RSA; +use rsa::Rsa; use error::ErrorStack; use util::{CallbackState, invoke_passwd_cb}; @@ -18,7 +18,7 @@ unsafe impl Sync for PKey {} /// Represents a public key, optionally with a private key attached. impl PKey { /// Create a new `PKey` containing an RSA key. - pub fn from_rsa(rsa: RSA) -> Result<PKey, ErrorStack> { + pub fn from_rsa(rsa: Rsa) -> Result<PKey, ErrorStack> { unsafe { let evp = try!(cvt_p(ffi::EVP_PKEY_new())); let pkey = PKey(evp); @@ -102,7 +102,7 @@ impl PKey { } /// assign RSA key to this pkey - pub fn set_rsa(&mut self, rsa: &RSA) -> Result<(), ErrorStack> { + pub fn set_rsa(&mut self, rsa: &Rsa) -> Result<(), ErrorStack> { unsafe { // this needs to be a reference as the set1_RSA ups the reference count let rsa_ptr = rsa.as_ptr(); @@ -112,11 +112,11 @@ impl PKey { } /// Get a reference to the interal RSA key for direct access to the key components - pub fn rsa(&self) -> Result<RSA, ErrorStack> { + pub fn rsa(&self) -> Result<Rsa, ErrorStack> { unsafe { let rsa = try!(cvt_p(ffi::EVP_PKEY_get1_RSA(self.0))); // this is safe as the ffi increments a reference counter to the internal key - Ok(RSA::from_ptr(rsa)) + Ok(Rsa::from_ptr(rsa)) } } |