aboutsummaryrefslogtreecommitdiff
path: root/pkey.rs
diff options
context:
space:
mode:
authorKevin Ballard <[email protected]>2013-05-29 23:42:07 -0700
committerKevin Ballard <[email protected]>2013-05-29 23:42:07 -0700
commit2eba04e579048bb33a7a99cb738d5d9118909026 (patch)
tree624777ef967533e7fcb40575a55de4058a37ee68 /pkey.rs
parentUpdate for current incoming (diff)
downloadrust-openssl-2eba04e579048bb33a7a99cb738d5d9118909026.tar.xz
rust-openssl-2eba04e579048bb33a7a99cb738d5d9118909026.zip
Update for latest incoming (3a3bf8b)
Diffstat (limited to 'pkey.rs')
-rw-r--r--pkey.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkey.rs b/pkey.rs
index 3d8ba5f9..30f48938 100644
--- a/pkey.rs
+++ b/pkey.rs
@@ -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