diff options
| author | Steven Fackler <[email protected]> | 2016-10-31 19:49:37 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-10-31 20:02:24 -0700 |
| commit | 849fca4a7b285368ea3fc6f484350d6fa59c29e8 (patch) | |
| tree | 2678fb6f82feb42cf1ed3197a348fecec56b2bd5 /openssl/src/x509/mod.rs | |
| parent | Update bignum (diff) | |
| download | rust-openssl-849fca4a7b285368ea3fc6f484350d6fa59c29e8.tar.xz rust-openssl-849fca4a7b285368ea3fc6f484350d6fa59c29e8.zip | |
Convert Asn1Time
Diffstat (limited to 'openssl/src/x509/mod.rs')
| -rw-r--r-- | openssl/src/x509/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs index b49a9848..8a4941ea 100644 --- a/openssl/src/x509/mod.rs +++ b/openssl/src/x509/mod.rs @@ -14,7 +14,6 @@ use std::str; use {cvt, cvt_p}; use asn1::Asn1Time; -use asn1::Asn1TimeRef; use bio::{MemBio, MemBioSlice}; use crypto::CryptoString; use hash::MessageDigest; @@ -24,6 +23,7 @@ use error::ErrorStack; use ffi; use nid::Nid; use opaque::Opaque; +use types::Ref; #[cfg(ossl10x)] use ffi::{X509_set_notBefore, X509_set_notAfter, ASN1_STRING_data}; @@ -401,20 +401,20 @@ impl X509Ref { } /// Returns certificate Not After validity period. - pub fn not_after<'a>(&'a self) -> &'a Asn1TimeRef { + pub fn not_after<'a>(&'a self) -> &'a Ref<Asn1Time> { unsafe { let date = compat::X509_get_notAfter(self.as_ptr()); assert!(!date.is_null()); - Asn1TimeRef::from_ptr(date) + Ref::from_ptr(date) } } /// Returns certificate Not Before validity period. - pub fn not_before<'a>(&'a self) -> &'a Asn1TimeRef { + pub fn not_before<'a>(&'a self) -> &'a Ref<Asn1Time> { unsafe { let date = compat::X509_get_notBefore(self.as_ptr()); assert!(!date.is_null()); - Asn1TimeRef::from_ptr(date) + Ref::from_ptr(date) } } |