Loading openssl/src/x509/mod.rs +2 −2 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ impl X509Builder { /// the X.509 standard should pass `2` to this method. #[corresponds(X509_set_version)] pub fn set_version(&mut self, version: i32) -> Result<(), ErrorStack> { unsafe { cvt(ffi::X509_set_version(self.0.as_ptr(), version.into())).map(|_| ()) } unsafe { cvt(ffi::X509_set_version(self.0.as_ptr(), version as c_long)).map(|_| ()) } } /// Sets the serial number of the certificate. Loading Loading @@ -1147,7 +1147,7 @@ impl X509ReqBuilder { /// ///[`X509_REQ_set_version`]: https://www.openssl.org/docs/man1.1.0/crypto/X509_REQ_set_version.html pub fn set_version(&mut self, version: i32) -> Result<(), ErrorStack> { unsafe { cvt(ffi::X509_REQ_set_version(self.0.as_ptr(), version.into())).map(|_| ()) } unsafe { cvt(ffi::X509_REQ_set_version(self.0.as_ptr(), version as c_long)).map(|_| ()) } } /// Set the issuer name. Loading Loading
openssl/src/x509/mod.rs +2 −2 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ impl X509Builder { /// the X.509 standard should pass `2` to this method. #[corresponds(X509_set_version)] pub fn set_version(&mut self, version: i32) -> Result<(), ErrorStack> { unsafe { cvt(ffi::X509_set_version(self.0.as_ptr(), version.into())).map(|_| ()) } unsafe { cvt(ffi::X509_set_version(self.0.as_ptr(), version as c_long)).map(|_| ()) } } /// Sets the serial number of the certificate. Loading Loading @@ -1147,7 +1147,7 @@ impl X509ReqBuilder { /// ///[`X509_REQ_set_version`]: https://www.openssl.org/docs/man1.1.0/crypto/X509_REQ_set_version.html pub fn set_version(&mut self, version: i32) -> Result<(), ErrorStack> { unsafe { cvt(ffi::X509_REQ_set_version(self.0.as_ptr(), version.into())).map(|_| ()) } unsafe { cvt(ffi::X509_REQ_set_version(self.0.as_ptr(), version as c_long)).map(|_| ()) } } /// Set the issuer name. Loading