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

Merge pull request #1597 from hottea773/add-issuer-name-hash

Add issuer_name_hash method to X509Ref
parents d8aa8a9a 9b79f7d5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -297,6 +297,7 @@ const_ptr_api! {
    }
}
extern "C" {
    pub fn X509_issuer_name_hash(x: *mut ::X509) -> c_ulong;
    pub fn X509_subject_name_hash(x: *mut ::X509) -> c_ulong;
}
const_ptr_api! {
+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>> {