libressl-X509_NAME_hash3
Calculate sha-1 or md5 hashes of x.501 name objects
Usage
Crypto Library (libcrypto, -lcrypto)
#include <openssl/x509.h>
unsigned long
X509_NAME_hash(X509_NAME *name);
unsigned long
X509_issuer_name_hash(X509 *x);
unsigned long
X509_subject_name_hash(X509 *x);
unsigned long
X509_NAME_hash_old(X509_NAME *name);
unsigned long
X509_issuer_name_hash_old(X509 *x);
unsigned long
X509_subject_name_hash_old(X509 *x);
Overview
X509_NAME_hash() calculates an SHA1(3) hash of the DER-encoded form of name. It is for example used by X509_LOOKUP_hash_dir(3) to locate certificate files in the file system.
X509_issuer_name_hash() and X509_subject_name_hash() are wrappers to calculate this hash of the issuer or subject name of x, respectively.
X509_NAME_hash_old(), X509_issuer_name_hash_old(), and X509_subject_name_hash_old() are variants that use MD5 instead of SHA-1.
Return values
These functions return the hash value or 0 if an error occurs.