aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-10-29 16:37:26 -0700
committerSteven Fackler <[email protected]>2016-10-29 16:37:56 -0700
commitc89f2c0be08bc77afc2f8a45e488ab8e394f0f3d (patch)
tree748e4fc2de4cd0346d505125f00d476e3983934a
parentMove docs (diff)
downloadrust-openssl-c89f2c0be08bc77afc2f8a45e488ab8e394f0f3d.tar.xz
rust-openssl-c89f2c0be08bc77afc2f8a45e488ab8e394f0f3d.zip
Use PKeyRef in X509Generator
-rw-r--r--openssl/src/x509/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs
index 31ed11b4..b7cbe363 100644
--- a/openssl/src/x509/mod.rs
+++ b/openssl/src/x509/mod.rs
@@ -18,7 +18,7 @@ use asn1::Asn1TimeRef;
use bio::{MemBio, MemBioSlice};
use crypto::CryptoString;
use hash::MessageDigest;
-use pkey::PKey;
+use pkey::{PKey, PKeyRef};
use rand::rand_bytes;
use error::ErrorStack;
use ffi;
@@ -278,7 +278,7 @@ impl X509Generator {
}
/// Sets the certificate public-key, then self-sign and return it
- pub fn sign(&self, p_key: &PKey) -> Result<X509, ErrorStack> {
+ pub fn sign(&self, p_key: &PKeyRef) -> Result<X509, ErrorStack> {
ffi::init();
unsafe {
@@ -330,7 +330,7 @@ impl X509Generator {
}
/// Obtain a certificate signing request (CSR)
- pub fn request(&self, p_key: &PKey) -> Result<X509Req, ErrorStack> {
+ pub fn request(&self, p_key: &PKeyRef) -> Result<X509Req, ErrorStack> {
let cert = match self.sign(p_key) {
Ok(c) => c,
Err(x) => return Err(x),