Fix 1.1.0 build

This commit is contained in:
Steven Fackler 2016-10-31 23:06:27 -07:00
parent f71395c600
commit dd4836cdf6
1 changed files with 10 additions and 1 deletions

View File

@ -54,7 +54,7 @@ impl Ref<Asn1String> {
} }
pub fn as_slice(&self) -> &[u8] { pub fn as_slice(&self) -> &[u8] {
unsafe { slice::from_raw_parts(ffi::ASN1_STRING_data(self.as_ptr()), self.len()) } unsafe { slice::from_raw_parts(ASN1_STRING_data(self.as_ptr()), self.len()) }
} }
pub fn len(&self) -> usize { pub fn len(&self) -> usize {
@ -63,3 +63,12 @@ impl Ref<Asn1String> {
} }
} }
} }
#[cfg(any(ossl101, ossl102))]
use ffi::ASN1_STRING_data;
#[cfg(ossl110)]
#[allow(bad_style)]
unsafe fn ASN1_STRING_data(s: *mut ffi::ASN1_STRING) -> *mut ::libc::c_uchar {
ffi::ASN1_STRING_get0_data(s) as *mut _
}