Loading openssl-sys/src/asn1.rs +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ extern "C" { pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; pub fn ASN1_TIME_set_string(s: *mut ASN1_TIME, str: *const c_char) -> c_int; #[cfg(ossl111)] pub fn ASN1_TIME_set_string_X509(s: *mut ASN1_TIME, str: *const c_char) -> c_int; } Loading openssl/src/asn1.rs +4 −0 Original line number Diff line number Diff line Loading @@ -149,7 +149,10 @@ impl Asn1Time { /// /// This corresponds to [`ASN1_TIME_set_string_X509`]. /// /// Requires OpenSSL 1.1.1 or newer. /// /// [`ASN1_TIME_set_string`]: https://www.openssl.org/docs/manmaster/man3/ASN1_TIME_set_string.html #[cfg(ossl111)] pub fn from_str_x509(s: &str) -> Result<Asn1Time, ErrorStack> { unsafe { let s = CString::new(s).unwrap(); Loading Loading @@ -385,6 +388,7 @@ mod tests { #[test] fn time_from_str() { Asn1Time::from_str("99991231235959Z").unwrap(); #[cfg(ossl111)] Asn1Time::from_str_x509("99991231235959Z").unwrap(); } } Loading
openssl-sys/src/asn1.rs +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ extern "C" { pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; pub fn ASN1_TIME_set_string(s: *mut ASN1_TIME, str: *const c_char) -> c_int; #[cfg(ossl111)] pub fn ASN1_TIME_set_string_X509(s: *mut ASN1_TIME, str: *const c_char) -> c_int; } Loading
openssl/src/asn1.rs +4 −0 Original line number Diff line number Diff line Loading @@ -149,7 +149,10 @@ impl Asn1Time { /// /// This corresponds to [`ASN1_TIME_set_string_X509`]. /// /// Requires OpenSSL 1.1.1 or newer. /// /// [`ASN1_TIME_set_string`]: https://www.openssl.org/docs/manmaster/man3/ASN1_TIME_set_string.html #[cfg(ossl111)] pub fn from_str_x509(s: &str) -> Result<Asn1Time, ErrorStack> { unsafe { let s = CString::new(s).unwrap(); Loading Loading @@ -385,6 +388,7 @@ mod tests { #[test] fn time_from_str() { Asn1Time::from_str("99991231235959Z").unwrap(); #[cfg(ossl111)] Asn1Time::from_str_x509("99991231235959Z").unwrap(); } }