Commit 7b73003b authored by Steven Fackler's avatar Steven Fackler
Browse files

Add X509StoreContext::error_depth

parent 62a7dd10
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -823,6 +823,7 @@ extern "C" {
    pub fn X509_STORE_CTX_get_current_cert(ct: *mut X509_STORE_CTX) -> *mut X509;
    pub fn X509_STORE_CTX_get_error(ctx: *mut X509_STORE_CTX) -> c_int;
    pub fn X509_STORE_CTX_get_ex_data(ctx: *mut X509_STORE_CTX, idx: c_int) -> *mut c_void;
    pub fn X509_STORE_CTX_get_error_depth(ctx: *mut X509_STORE_CTX) -> c_int;

    pub fn X509V3_EXT_conf_nid(conf: *mut c_void, ctx: *mut X509V3_CTX, ext_nid: c_int, value: *mut c_char) -> *mut X509_EXTENSION;
    pub fn X509V3_EXT_conf(conf: *mut c_void, ctx: *mut X509V3_CTX, name: *mut c_char, value: *mut c_char) -> *mut X509_EXTENSION;
+4 −0
Original line number Diff line number Diff line
@@ -104,6 +104,10 @@ impl X509StoreContext {
            })
        }
    }

    pub fn error_depth(&self) -> u32 {
        unsafe { ffi::X509_STORE_CTX_get_error_depth(self.ctx) as u32 }
    }
}

#[allow(non_snake_case)]