diff options
Diffstat (limited to 'openssl/src')
| -rw-r--r-- | openssl/src/pkey.rs | 2 | ||||
| -rw-r--r-- | openssl/src/sign.rs | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/openssl/src/pkey.rs b/openssl/src/pkey.rs index 0d8de1dd..c9f5ec1b 100644 --- a/openssl/src/pkey.rs +++ b/openssl/src/pkey.rs @@ -161,7 +161,7 @@ impl PKeyCtxRef { Ok(()) } - pub fn rsa_padding(&mut self) -> Result<Padding, ErrorStack> { + pub fn rsa_padding(&self) -> Result<Padding, ErrorStack> { let mut pad: c_int = 0; unsafe { try!(cvt(ffi::EVP_PKEY_CTX_get_rsa_padding(self.as_ptr(), &mut pad))); diff --git a/openssl/src/sign.rs b/openssl/src/sign.rs index 3ae8f1a2..ac33bd07 100644 --- a/openssl/src/sign.rs +++ b/openssl/src/sign.rs @@ -119,6 +119,10 @@ impl<'a> Signer<'a> { } } + pub fn pkey_ctx(&self) -> &PKeyCtxRef { + unsafe { ::types::OpenSslTypeRef::from_ptr(self.pkey_ctx) } + } + pub fn pkey_ctx_mut(&mut self) -> &mut PKeyCtxRef { unsafe { ::types::OpenSslTypeRef::from_ptr_mut(self.pkey_ctx) } } @@ -195,6 +199,10 @@ impl<'a> Verifier<'a> { } } + pub fn pkey_ctx(&self) -> &PKeyCtxRef { + unsafe { ::types::OpenSslTypeRef::from_ptr(self.pkey_ctx) } + } + pub fn pkey_ctx_mut(&mut self) -> &mut PKeyCtxRef { unsafe { ::types::OpenSslTypeRef::from_ptr_mut(self.pkey_ctx) } } |