Skip to content

Commit 8707772

Browse files
committed
fix c related integer issues
1 parent 57e376a commit 8707772

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

openssl/src/x509/mod.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,10 @@ impl X509Crl {
18521852
pub fn new(issuer_cert: &X509) -> Result<Self, ErrorStack> {
18531853
unsafe {
18541854
let crl = cvt_p(ffi::X509_CRL_new())?;
1855-
cvt(ffi::X509_CRL_set_version(crl, issuer_cert.version() as i64))?;
1855+
cvt(ffi::X509_CRL_set_version(
1856+
crl,
1857+
issuer_cert.version() as c_long,
1858+
))?;
18561859
cvt(ffi::X509_CRL_set_issuer_name(
18571860
crl,
18581861
issuer_cert.issuer_name().as_ptr(),
@@ -1939,7 +1942,7 @@ impl X509Crl {
19391942
ffi::NID_crl_number,
19401943
std::mem::transmute(value.as_ptr()),
19411944
0,
1942-
ffi::X509V3_ADD_REPLACE,
1945+
ffi::X509V3_ADD_REPLACE as std::ffi::c_ulong,
19431946
))
19441947
.map(|_| ())
19451948
}

0 commit comments

Comments
 (0)