From 9cf4429659a1a19e816dd4d4ddce25def809739a Mon Sep 17 00:00:00 2001 From: Georg Weisert Date: Sat, 17 Feb 2024 10:34:04 +0100 Subject: [PATCH] fix c related integer issues --- openssl/src/x509/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs index 5cc9039fc..23f10a7d9 100644 --- a/openssl/src/x509/mod.rs +++ b/openssl/src/x509/mod.rs @@ -1852,7 +1852,10 @@ impl X509Crl { pub fn new(issuer_cert: &X509) -> Result { unsafe { let crl = cvt_p(ffi::X509_CRL_new())?; - cvt(ffi::X509_CRL_set_version(crl, issuer_cert.version() as i64))?; + cvt(ffi::X509_CRL_set_version( + crl, + issuer_cert.version() as c_long, + ))?; cvt(ffi::X509_CRL_set_issuer_name( crl, issuer_cert.issuer_name().as_ptr(), @@ -1939,7 +1942,8 @@ impl X509Crl { ffi::NID_crl_number, std::mem::transmute(value.as_ptr()), 0, - ffi::X509V3_ADD_REPLACE, + #[allow(clippy::useless_conversion)] + ffi::X509V3_ADD_REPLACE.try_into().expect("This is an openssl flag and should therefore always fit into the expected integer type"), )) .map(|_| ()) }