diff options
| author | Kevin Ballard <[email protected]> | 2013-05-29 23:42:07 -0700 |
|---|---|---|
| committer | Kevin Ballard <[email protected]> | 2013-05-29 23:42:07 -0700 |
| commit | 2eba04e579048bb33a7a99cb738d5d9118909026 (patch) | |
| tree | 624777ef967533e7fcb40575a55de4058a37ee68 /pkey.rs | |
| parent | Update for current incoming (diff) | |
| download | rust-openssl-2eba04e579048bb33a7a99cb738d5d9118909026.tar.xz rust-openssl-2eba04e579048bb33a7a99cb738d5d9118909026.zip | |
Update for latest incoming (3a3bf8b)
Diffstat (limited to 'pkey.rs')
| -rw-r--r-- | pkey.rs | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,5 @@ use std::libc::{c_int, c_uint}; +use std::{libc,cast,ptr,vec}; use hash::{HashType, MD5, SHA1, SHA224, SHA256, SHA384, SHA512}; #[allow(non_camel_case_types)] @@ -99,7 +100,7 @@ pub fn PKey() -> PKey { ///Represents a public key, optionally with a private key attached. priv impl PKey { - priv fn _tostr(&self, f: extern "C" unsafe fn(*EVP_PKEY, &*mut u8) -> c_int) -> ~[u8] { + priv unsafe fn _tostr(&self, f: extern "C" unsafe fn(*EVP_PKEY, &*mut u8) -> c_int) -> ~[u8] { let buf = ptr::mut_null(); let len = f(self.evp, &buf); if len < 0 as c_int { return ~[]; } @@ -112,7 +113,7 @@ priv impl PKey { vec::slice(s, 0u, r as uint).to_owned() } - priv fn _fromstr( + priv unsafe fn _fromstr( &mut self, s: &[u8], f: extern "C" unsafe fn(c_int, &*EVP_PKEY, &*u8, c_uint) -> *EVP_PKEY |