xref: /netbsd-src/crypto/external/bsd/openssl.old/dist/doc/man3/X509_digest.pod (revision 4724848cf0da353df257f730694b7882798e5daf)
1*4724848cSchristos=pod
2*4724848cSchristos
3*4724848cSchristos=head1 NAME
4*4724848cSchristos
5*4724848cSchristosX509_digest, X509_CRL_digest,
6*4724848cSchristosX509_pubkey_digest,
7*4724848cSchristosX509_NAME_digest,
8*4724848cSchristosX509_REQ_digest,
9*4724848cSchristosPKCS7_ISSUER_AND_SERIAL_digest
10*4724848cSchristos- get digest of various objects
11*4724848cSchristos
12*4724848cSchristos=head1 SYNOPSIS
13*4724848cSchristos
14*4724848cSchristos #include <openssl/x509.h>
15*4724848cSchristos
16*4724848cSchristos int X509_digest(const X509 *data, const EVP_MD *type, unsigned char *md,
17*4724848cSchristos                 unsigned int *len);
18*4724848cSchristos
19*4724848cSchristos int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, unsigned char *md,
20*4724848cSchristos                     unsigned int *len);
21*4724848cSchristos
22*4724848cSchristos int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
23*4724848cSchristos                        unsigned char *md, unsigned int *len);
24*4724848cSchristos
25*4724848cSchristos int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
26*4724848cSchristos                     unsigned char *md, unsigned int *len);
27*4724848cSchristos
28*4724848cSchristos int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
29*4724848cSchristos                      unsigned char *md, unsigned int *len);
30*4724848cSchristos
31*4724848cSchristos #include <openssl/pkcs7.h>
32*4724848cSchristos
33*4724848cSchristos int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
34*4724848cSchristos                                    const EVP_MD *type, unsigned char *md,
35*4724848cSchristos                                    unsigned int *len);
36*4724848cSchristos
37*4724848cSchristos=head1 DESCRIPTION
38*4724848cSchristos
39*4724848cSchristosX509_pubkey_digest() returns a digest of the DER representation of the public
40*4724848cSchristoskey in the specified X509 B<data> object.
41*4724848cSchristosAll other functions described here return a digest of the DER representation
42*4724848cSchristosof their entire B<data> objects.
43*4724848cSchristos
44*4724848cSchristosThe B<type> parameter specifies the digest to
45*4724848cSchristosbe used, such as EVP_sha1(). The B<md> is a pointer to the buffer where the
46*4724848cSchristosdigest will be copied and is assumed to be large enough; the constant
47*4724848cSchristosB<EVP_MAX_MD_SIZE> is suggested. The B<len> parameter, if not NULL, points
48*4724848cSchristosto a place where the digest size will be stored.
49*4724848cSchristos
50*4724848cSchristos=head1 RETURN VALUES
51*4724848cSchristos
52*4724848cSchristosAll functions described here return 1 for success and 0 for failure.
53*4724848cSchristos
54*4724848cSchristos=head1 SEE ALSO
55*4724848cSchristos
56*4724848cSchristosL<EVP_sha1(3)>
57*4724848cSchristos
58*4724848cSchristos=head1 COPYRIGHT
59*4724848cSchristos
60*4724848cSchristosCopyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
61*4724848cSchristos
62*4724848cSchristosLicensed under the OpenSSL license (the "License").  You may not use
63*4724848cSchristosthis file except in compliance with the License.  You can obtain a copy
64*4724848cSchristosin the file LICENSE in the source distribution or at
65*4724848cSchristosL<https://www.openssl.org/source/license.html>.
66*4724848cSchristos
67*4724848cSchristos=cut
68