Unverified Commit f9907087 authored by Steven Fackler's avatar Steven Fackler Committed by GitHub
Browse files

Merge pull request #2042 from jgallagher/sys-add-x509-check-fns

[openssl-sys] Add X509_check_{host,email,ip,ip_asc} fns
parents b1ac079d 2dc8f96d
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -145,3 +145,22 @@ extern "C" {
    pub fn DIST_POINT_free(dist_point: *mut DIST_POINT);
    pub fn DIST_POINT_NAME_free(dist_point: *mut DIST_POINT_NAME);
}

#[cfg(ossl102)]
extern "C" {
    pub fn X509_check_host(
        x: *mut X509,
        chk: *const c_char,
        chklen: usize,
        flags: c_uint,
        peername: *mut *mut c_char,
    ) -> c_int;
    pub fn X509_check_email(
        x: *mut X509,
        chk: *const c_char,
        chklen: usize,
        flags: c_uint,
    ) -> c_int;
    pub fn X509_check_ip(x: *mut X509, chk: *const c_uchar, chklen: usize, flags: c_uint) -> c_int;
    pub fn X509_check_ip_asc(x: *mut X509, ipasc: *const c_char, flags: c_uint) -> c_int;
}