From 6789a72fc0bdfc30448d1dc5d804ea150d809271 Mon Sep 17 00:00:00 2001 From: Anthony Ramine <123095+nox@users.noreply.github.com> Date: Mon, 2 Jun 2025 16:39:25 +0200 Subject: [PATCH] Fix X509VerifyContextRef::set_verify_param (#358) This method takes ownership of the given verify param. --- boring/src/x509/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boring/src/x509/mod.rs b/boring/src/x509/mod.rs index 94871b93..57a0083f 100644 --- a/boring/src/x509/mod.rs +++ b/boring/src/x509/mod.rs @@ -38,7 +38,7 @@ use crate::ssl::SslRef; use crate::stack::{Stack, StackRef, Stackable}; use crate::string::OpensslString; use crate::util::ForeignTypeRefExt; -use crate::x509::verify::X509VerifyParamRef; +use crate::x509::verify::{X509VerifyParam, X509VerifyParamRef}; use crate::{cvt, cvt_n, cvt_p}; pub mod extension; @@ -148,9 +148,9 @@ impl X509StoreContextRef { unsafe { X509VerifyParamRef::from_ptr_mut(ffi::X509_STORE_CTX_get0_param(self.as_ptr())) } } - /// Sets the X509 verifification configuration on the X509_STORE_CTX. + /// Sets the X509 verification configuration. #[corresponds(X509_STORE_CTX_set0_param)] - pub fn set_verify_param(&mut self, param: &mut X509VerifyParamRef) { + pub fn set_verify_param(&mut self, param: X509VerifyParam) { unsafe { ffi::X509_STORE_CTX_set0_param(self.as_ptr(), param.as_ptr()) } }