1X509_DIGEST(3)                      OpenSSL                     X509_DIGEST(3)
2
3
4

NAME

6       X509_digest, X509_CRL_digest, X509_pubkey_digest, X509_NAME_digest,
7       X509_REQ_digest, PKCS7_ISSUER_AND_SERIAL_digest - get digest of various
8       objects
9

SYNOPSIS

11        #include <openssl/x509.h>
12
13        int X509_digest(const X509 *data, const EVP_MD *type, unsigned char *md,
14                        unsigned int *len);
15
16        int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, unsigned char *md,
17                            unsigned int *len);
18
19        int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
20                               unsigned char *md, unsigned int *len);
21
22        int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
23                            unsigned char *md, unsigned int *len);
24
25        int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
26                             unsigned char *md, unsigned int *len);
27
28        #include <openssl/pkcs7.h>
29
30        int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
31                                           const EVP_MD *type, unsigned char *md,
32                                           unsigned int *len);
33

DESCRIPTION

35       X509_pubkey_digest() returns a digest of the DER representation of the
36       public key in the specified X509 data object.  All other functions
37       described here return a digest of the DER representation of their
38       entire data objects.
39
40       The type parameter specifies the digest to be used, such as EVP_sha1().
41       The md is a pointer to the buffer where the digest will be copied and
42       is assumed to be large enough; the constant EVP_MAX_MD_SIZE is
43       suggested. The len parameter, if not NULL, points to a place where the
44       digest size will be stored.
45

RETURN VALUES

47       All functions described here return 1 for success and 0 for failure.
48

SEE ALSO

50       EVP_sha1(3)
51
53       Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
54
55       Licensed under the OpenSSL license (the "License").  You may not use
56       this file except in compliance with the License.  You can obtain a copy
57       in the file LICENSE in the source distribution or at
58       <https://www.openssl.org/source/license.html>.
59
60
61
621.1.1i                            2021-07-22                    X509_DIGEST(3)
Impressum