diff options
| author | Steven Fackler <[email protected]> | 2016-08-07 22:35:37 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-08-07 22:35:37 -0700 |
| commit | 2a3e9a28564626bea0bf729a0ecee43553697654 (patch) | |
| tree | fbe2674308cf5790c1b60e5ab12097c54dfe14b7 /openssl/src/x509 | |
| parent | Move init to crate root (diff) | |
| download | rust-openssl-2a3e9a28564626bea0bf729a0ecee43553697654.tar.xz rust-openssl-2a3e9a28564626bea0bf729a0ecee43553697654.zip | |
Add RSA::generate
Diffstat (limited to 'openssl/src/x509')
| -rw-r--r-- | openssl/src/x509/tests.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/openssl/src/x509/tests.rs b/openssl/src/x509/tests.rs index 86b5f92b..aedcaf55 100644 --- a/openssl/src/x509/tests.rs +++ b/openssl/src/x509/tests.rs @@ -2,6 +2,7 @@ use serialize::hex::FromHex; use crypto::hash::Type::SHA1; use crypto::pkey::PKey; +use crypto::rsa::RSA; use x509::{X509, X509Generator}; use x509::extension::Extension::{KeyUsage, ExtKeyUsage, SubjectAltName, OtherNid, OtherStr}; use x509::extension::AltNameOption as SAN; @@ -61,19 +62,20 @@ fn test_cert_gen_extension_bad_ordering() { assert!(result.is_err()); } +*/ #[test] fn test_req_gen() { - let mut pkey = PKey::new(); - pkey.gen(512); + let rsa = RSA::generate(512).unwrap(); + let mut pkey = PKey::new().unwrap(); + pkey.set_rsa(&rsa).unwrap(); let req = get_generator().request(&pkey).unwrap(); - req.write_pem().unwrap(); + req.to_pem().unwrap(); // FIXME: check data in result to be correct, needs implementation // of X509_REQ getters } -*/ #[test] fn test_cert_loading() { |