Skip to content

Commit

Permalink
fix c related integer issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Georg Weisert committed Feb 17, 2024
1 parent 57e376a commit 8707772
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openssl/src/x509/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,10 @@ impl X509Crl {
pub fn new(issuer_cert: &X509) -> Result<Self, ErrorStack> {
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(),
Expand Down Expand Up @@ -1939,7 +1942,7 @@ impl X509Crl {
ffi::NID_crl_number,
std::mem::transmute(value.as_ptr()),
0,
ffi::X509V3_ADD_REPLACE,
ffi::X509V3_ADD_REPLACE as std::ffi::c_ulong,
))
.map(|_| ())
}
Expand Down

0 comments on commit 8707772

Please sign in to comment.