| diff --git a/src/x509/mod.rs b/src/x509/mod.rs |
| index 45f2467..a03a8aa 100644 |
| --- a/src/x509/mod.rs |
| +++ b/src/x509/mod.rs |
| @@ -893,13 +893,13 @@ impl X509NameBuilder { |
| pub fn append_entry_by_text(&mut self, field: &str, value: &str) -> Result<(), ErrorStack> { |
| unsafe { |
| let field = CString::new(field).unwrap(); |
| - assert!(value.len() <= c_int::max_value() as usize); |
| + assert!(value.len() <= isize::max_value() as usize); |
| cvt(ffi::X509_NAME_add_entry_by_txt( |
| self.0.as_ptr(), |
| field.as_ptr() as *mut _, |
| ffi::MBSTRING_UTF8, |
| value.as_ptr(), |
| - value.len() as c_int, |
| + value.len() as isize, |
| -1, |
| 0, |
| )) |
| @@ -920,13 +920,13 @@ impl X509NameBuilder { |
| ) -> Result<(), ErrorStack> { |
| unsafe { |
| let field = CString::new(field).unwrap(); |
| - assert!(value.len() <= c_int::max_value() as usize); |
| + assert!(value.len() <= isize::max_value() as usize); |
| cvt(ffi::X509_NAME_add_entry_by_txt( |
| self.0.as_ptr(), |
| field.as_ptr() as *mut _, |
| ty.as_raw(), |
| value.as_ptr(), |
| - value.len() as c_int, |
| + value.len() as isize, |
| -1, |
| 0, |
| )) |
| @@ -941,13 +941,13 @@ impl X509NameBuilder { |
| /// [`X509_NAME_add_entry_by_NID`]: https://www.openssl.org/docs/man1.1.0/crypto/X509_NAME_add_entry_by_NID.html |
| pub fn append_entry_by_nid(&mut self, field: Nid, value: &str) -> Result<(), ErrorStack> { |
| unsafe { |
| - assert!(value.len() <= c_int::max_value() as usize); |
| + assert!(value.len() <= isize::max_value() as usize); |
| cvt(ffi::X509_NAME_add_entry_by_NID( |
| self.0.as_ptr(), |
| field.as_raw(), |
| ffi::MBSTRING_UTF8, |
| value.as_ptr() as *mut _, |
| - value.len() as c_int, |
| + value.len() as isize, |
| -1, |
| 0, |
| )) |
| @@ -967,13 +967,13 @@ impl X509NameBuilder { |
| ty: Asn1Type, |
| ) -> Result<(), ErrorStack> { |
| unsafe { |
| - assert!(value.len() <= c_int::max_value() as usize); |
| + assert!(value.len() <= isize::max_value() as usize); |
| cvt(ffi::X509_NAME_add_entry_by_NID( |
| self.0.as_ptr(), |
| field.as_raw(), |
| ty.as_raw(), |
| value.as_ptr() as *mut _, |
| - value.len() as c_int, |
| + value.len() as isize, |
| -1, |
| 0, |
| )) |