Commit 0a44a12a authored by iamwwc's avatar iamwwc
Browse files

rename function

parent a43e8284
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -409,7 +409,7 @@ cfg_if! {
    }
}
#[cfg(ossl102)]
pub unsafe fn SSL_add_chain_certificate_pem(ssl: *mut ::SSL, ptr: *mut c_void) -> c_long {
pub unsafe fn SSL_add1_chain_cert(ssl: *mut ::SSL, ptr: *mut c_void) -> c_long {
    SSL_ctrl(ssl, SSL_CTRL_CHAIN_CERT, 1, ptr)
}

+2 −3
Original line number Diff line number Diff line
@@ -3106,10 +3106,9 @@ impl SslRef {
    }
    #[corresponds(SSL_add1_chain_cert)]
    #[cfg(ossl102)]
    pub fn add_chain_certificate_pem(&mut self, chain: &[u8]) -> Result<(), ErrorStack> {
    pub fn add_chain_cert_pem(&mut self, chain: &[u8]) -> Result<(), ErrorStack> {
        let cert = X509::from_pem(chain)?;
        let ret =
            unsafe { ffi::SSL_add_chain_certificate_pem(self.as_ptr(), cert.as_ptr() as *mut _) };
        let ret = unsafe { ffi::SSL_add1_chain_cert(self.as_ptr(), cert.as_ptr() as *mut _) };
        if ret == 1 {
            Ok(())
        } else {