diff options
| author | David Weinstein <[email protected]> | 2016-08-16 22:39:30 -0400 |
|---|---|---|
| committer | David Weinstein <[email protected]> | 2016-08-17 01:23:54 -0400 |
| commit | 96b1ef829cc51a901dd7b7225b9307b8628a4898 (patch) | |
| tree | 994620614ab4aedce01827ea030a1e8180c9ced6 /openssl/src/x509 | |
| parent | Introduce `Asn1TimeRef` (diff) | |
| download | rust-openssl-96b1ef829cc51a901dd7b7225b9307b8628a4898.tar.xz rust-openssl-96b1ef829cc51a901dd7b7225b9307b8628a4898.zip | |
Add `"x509_expiry"` feature flag
- fix return of `ASN1_TIME_print`
- assert on null `date`
Diffstat (limited to 'openssl/src/x509')
| -rw-r--r-- | openssl/src/x509/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs index dc649f18..bb5743e9 100644 --- a/openssl/src/x509/mod.rs +++ b/openssl/src/x509/mod.rs @@ -434,17 +434,21 @@ impl<'a> X509Ref<'a> { } /// Returns Issuer validity notAfter + #[cfg(feature = "x509_expiry")] pub fn not_after(&self) -> Asn1TimeRef { unsafe { let date = ::c_helpers::rust_0_8_X509_get_notAfter(self.0); + assert!(!date.is_null()); Asn1TimeRef::from_ptr(date) } } /// Returns Issuer validity notBefore + #[cfg(feature = "x509_expiry")] pub fn not_before(&self) -> Asn1TimeRef { unsafe { let date = ::c_helpers::rust_0_8_X509_get_notBefore(self.0); + assert!(!date.is_null()); Asn1TimeRef::from_ptr(date) } } |