Commit 257b4c94 authored by hottea773's avatar hottea773 Committed by Huw Thomas
Browse files

Add issuer_name_hash method to X509Ref

parent d8aa8a9a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -296,6 +296,9 @@ const_ptr_api! {
        pub fn X509_set_issuer_name(x: *mut X509, name: #[const_ptr_if(ossl300)] X509_NAME) -> c_int;
    }
}
extern "C" {
    pub fn X509_issuer_name_hash(x: *mut ::X509) -> c_ulong;
}
extern "C" {
    pub fn X509_subject_name_hash(x: *mut ::X509) -> c_ulong;
}
+6 −0
Original line number Diff line number Diff line
@@ -393,6 +393,12 @@ impl X509Ref {
        }
    }

    /// Returns the hash of the certificates issuer
    #[corresponds(X509_issuer_name_hash)]
    pub fn issuer_name_hash(&self) -> u32 {
        unsafe { ffi::X509_issuer_name_hash(self.as_ptr()) as u32 }
    }

    /// Returns this certificate's subject alternative name entries, if they exist.
    #[corresponds(X509_get_ext_d2i)]
    pub fn subject_alt_names(&self) -> Option<Stack<GeneralName>> {