chore(openssl):fix increase X509 reference count

This commit is contained in:
pluveto 2024-06-26 18:08:18 +08:00
parent e132431889
commit 7841271b4a

View file

@ -121,7 +121,7 @@ pub fn ssl_add_chain_cert(ssl: &mut SslRef, cert: &X509Ref) -> Result<(), ErrorS
cvt(SSL_ctrl( cvt(SSL_ctrl(
ssl.as_ptr(), ssl.as_ptr(),
SSL_CTRL_CHAIN_CERT, SSL_CTRL_CHAIN_CERT,
0, 1, // increase the ref count of X509 so that ssl can outlive X509StoreRef
cert.as_ptr() as *mut c_void, cert.as_ptr() as *mut c_void,
))?; ))?;
} }