Fix build
This commit is contained in:
parent
1c1af4b38b
commit
ad2517f797
|
|
@ -896,13 +896,13 @@ impl X509NameBuilder {
|
||||||
) -> Result<(), ErrorStack> {
|
) -> Result<(), ErrorStack> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let field = CString::new(field).unwrap();
|
let field = CString::new(field).unwrap();
|
||||||
assert!(value.len() <= c_int::max_value() as usize);
|
assert!(value.len() <= ValueLen::max_value() as usize);
|
||||||
cvt(ffi::X509_NAME_add_entry_by_txt(
|
cvt(ffi::X509_NAME_add_entry_by_txt(
|
||||||
self.0.as_ptr(),
|
self.0.as_ptr(),
|
||||||
field.as_ptr() as *mut _,
|
field.as_ptr() as *mut _,
|
||||||
ty.as_raw(),
|
ty.as_raw(),
|
||||||
value.as_ptr(),
|
value.as_ptr(),
|
||||||
value.len() as c_int,
|
value.len() as ValueLen,
|
||||||
-1,
|
-1,
|
||||||
0,
|
0,
|
||||||
))
|
))
|
||||||
|
|
@ -943,13 +943,13 @@ impl X509NameBuilder {
|
||||||
ty: Asn1Type,
|
ty: Asn1Type,
|
||||||
) -> Result<(), ErrorStack> {
|
) -> Result<(), ErrorStack> {
|
||||||
unsafe {
|
unsafe {
|
||||||
assert!(value.len() <= c_int::max_value() as usize);
|
assert!(value.len() <= ValueLen::max_value() as usize);
|
||||||
cvt(ffi::X509_NAME_add_entry_by_NID(
|
cvt(ffi::X509_NAME_add_entry_by_NID(
|
||||||
self.0.as_ptr(),
|
self.0.as_ptr(),
|
||||||
field.as_raw(),
|
field.as_raw(),
|
||||||
ty.as_raw(),
|
ty.as_raw(),
|
||||||
value.as_ptr() as *mut _,
|
value.as_ptr() as *mut _,
|
||||||
value.len() as c_int,
|
value.len() as ValueLen,
|
||||||
-1,
|
-1,
|
||||||
0,
|
0,
|
||||||
))
|
))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue