Commit 5c2cc874 authored by iamwwc's avatar iamwwc
Browse files

reflect macro name

parent 8c475f7b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3106,9 +3106,8 @@ impl SslRef {
    }
    #[corresponds(SSL_add1_chain_cert)]
    #[cfg(ossl102)]
    pub fn add_chain_cert_pem(&mut self, chain: &[u8]) -> Result<(), ErrorStack> {
        let cert = X509::from_pem(chain)?;
        let ret = unsafe { ffi::SSL_add1_chain_cert(self.as_ptr(), cert.as_ptr() as *mut _) };
    pub fn add_chain_cert_pem(&mut self, chain: X509) -> Result<(), ErrorStack> {
        let ret = unsafe { ffi::SSL_add1_chain_cert(self.as_ptr(), chain.as_ptr() as *mut _) };
        if ret == 1 {
            Ok(())
        } else {
+2 −1
Original line number Diff line number Diff line
@@ -1417,6 +1417,7 @@ fn session_cache_size() {
#[test]
fn add_chain_cert_pem() {
    let ctx = SslContext::builder(SslMethod::tls()).unwrap().build();
    let cert = X509::from_pem(CERT).unwrap();
    let mut ssl = Ssl::new(&ctx).unwrap();
    assert!(ssl.add_chain_cert_pem(CERT).is_ok());
    assert!(ssl.add_chain_cert_pem(cert).is_ok());
}