diff options
| author | Steven Fackler <[email protected]> | 2017-12-26 14:20:51 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2017-12-26 14:43:10 -0700 |
| commit | 129b6b9d847692810cebee52bd7f059f19ead0d2 (patch) | |
| tree | 17a8dfeae9970c73f2ce0cdc9470a9bb56f17b0e /openssl/src/x509/tests.rs | |
| parent | Merge pull request #800 from sfackler/connector-construction (diff) | |
| download | rust-openssl-129b6b9d847692810cebee52bd7f059f19ead0d2.tar.xz rust-openssl-129b6b9d847692810cebee52bd7f059f19ead0d2.zip | |
Overhaul verify error type
Also set the error in the hostname verification callback for 1.0.1
Diffstat (limited to 'openssl/src/x509/tests.rs')
| -rw-r--r-- | openssl/src/x509/tests.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openssl/src/x509/tests.rs b/openssl/src/x509/tests.rs index a86aa30a..366b91e7 100644 --- a/openssl/src/x509/tests.rs +++ b/openssl/src/x509/tests.rs @@ -7,7 +7,7 @@ use nid::Nid; use pkey::PKey; use rsa::Rsa; use stack::Stack; -use x509::{X509, X509Name, X509Req}; +use x509::{X509, X509Name, X509Req, X509VerifyResult}; use x509::extension::{AuthorityKeyIdentifier, BasicConstraints, ExtendedKeyUsage, KeyUsage, SubjectAlternativeName, SubjectKeyIdentifier}; @@ -253,8 +253,8 @@ fn issued() { let ca = include_bytes!("../../test/root-ca.pem"); let ca = X509::from_pem(ca).unwrap(); - ca.issued(&cert).unwrap(); - cert.issued(&cert).err().unwrap(); + assert_eq!(ca.issued(&cert), X509VerifyResult::OK); + assert_ne!(cert.issued(&cert), X509VerifyResult::OK); } #[test] |