aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ballard <[email protected]>2013-05-10 20:19:25 -0700
committerKevin Ballard <[email protected]>2013-05-10 20:19:25 -0700
commitf824a241d4828a579fdfc08ee884bc8c576a525f (patch)
tree20ec2a35113e30d235bd9fc24df2640edf9b33f2
parentRemove debug prints in Crypter::final() (diff)
downloadrust-openssl-f824a241d4828a579fdfc08ee884bc8c576a525f.tar.xz
rust-openssl-f824a241d4828a579fdfc08ee884bc8c576a525f.zip
Tweak for rust trunk (c081ffb 2013-04-30 02:21:37 -0700)
-rw-r--r--pkey.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/pkey.rs b/pkey.rs
index a3533778..87fcc6a6 100644
--- a/pkey.rs
+++ b/pkey.rs
@@ -76,13 +76,13 @@ fn openssl_hash_nid(hash: HashType) -> c_int {
fn rsa_to_any(rsa: *RSA) -> *ANYKEY {
unsafe {
- cast::reinterpret_cast(&rsa)
+ cast::transmute_copy(&rsa)
}
}
fn any_to_rsa(anykey: *ANYKEY) -> *RSA {
unsafe {
- cast::reinterpret_cast(&anykey)
+ cast::transmute_copy(&anykey)
}
}
@@ -325,20 +325,18 @@ pub impl PKey {
do vec::as_mut_buf(r) |pr, _len| {
do vec::as_imm_buf(s) |ps, s_len| {
- let plen = ptr::addr_of(&len);
-
let rv = libcrypto::RSA_sign(
openssl_hash_nid(hash),
ps,
s_len as c_uint,
pr,
- plen,
+ &len,
rsa);
if rv < 0 as c_int {
~[]
} else {
- vec::const_slice(r, 0u, *plen as uint).to_owned()
+ vec::const_slice(r, 0u, len as uint).to_owned()
}
}
}