aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/crypto/dsa.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-08-10 21:25:18 -0700
committerSteven Fackler <[email protected]>2016-08-10 21:25:18 -0700
commitc15642ccea8e38362ab65cfbb94d638518375658 (patch)
treeae4fc2f42a1afbd96b7e41e268ceabaa6fe4e68e /openssl/src/crypto/dsa.rs
parentMore API cleanup (diff)
downloadrust-openssl-c15642ccea8e38362ab65cfbb94d638518375658.tar.xz
rust-openssl-c15642ccea8e38362ab65cfbb94d638518375658.zip
Tweaks
Diffstat (limited to 'openssl/src/crypto/dsa.rs')
-rw-r--r--openssl/src/crypto/dsa.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/openssl/src/crypto/dsa.rs b/openssl/src/crypto/dsa.rs
index 7e6f0381..7d6e1c05 100644
--- a/openssl/src/crypto/dsa.rs
+++ b/openssl/src/crypto/dsa.rs
@@ -15,7 +15,7 @@ use crypto::util::{CallbackState, invoke_passwd_cb};
pub struct DSAParams(*mut ffi::DSA);
impl DSAParams {
- pub fn with_size(size: usize) -> Result<DSAParams, ErrorStack> {
+ pub fn with_size(size: u32) -> Result<DSAParams, ErrorStack> {
unsafe {
// Wrap it so that if we panic we'll call the dtor
let dsa = DSAParams(try_ssl_null!(ffi::DSA_new()));
@@ -55,14 +55,13 @@ impl Drop for DSA {
}
impl DSA {
- /// the caller should assert that the dsa pointer is valid.
- pub unsafe fn from_raw(dsa: *mut ffi::DSA) -> DSA {
+ pub unsafe fn from_ptr(dsa: *mut ffi::DSA) -> DSA {
DSA(dsa)
}
/// Generate a DSA key pair
/// For more complicated key generation scenarios see the `DSAParams` type
- pub fn generate(size: usize) -> Result<DSA, ErrorStack> {
+ pub fn generate(size: u32) -> Result<DSA, ErrorStack> {
let params = try!(DSAParams::with_size(size));
params.generate()
}