2
0

X509_digest.pod 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. =pod
  2. =head1 NAME
  3. X509_digest, X509_CRL_digest,
  4. X509_pubkey_digest,
  5. X509_NAME_digest,
  6. X509_REQ_digest,
  7. PKCS7_ISSUER_AND_SERIAL_digest
  8. - get digest of various objects
  9. =head1 SYNOPSIS
  10. #include <openssl/x509.h>
  11. int X509_digest(const X509 *data, const EVP_MD *type, unsigned char *md,
  12. unsigned int *len);
  13. int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, unsigned char *md,
  14. unsigned int *len);
  15. int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
  16. unsigned char *md, unsigned int *len);
  17. int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
  18. unsigned char *md, unsigned int *len);
  19. int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
  20. unsigned char *md, unsigned int *len);
  21. int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
  22. const EVP_MD *type, unsigned char *md,
  23. unsigned int *len);
  24. =head1 DESCRIPTION
  25. X509_pubkey_digest() returns a digest of the DER representation of the public
  26. key in the specified X509 B<data> object.
  27. All other functions described here return a digest of the DER representation
  28. of their entire B<data> objects.
  29. The B<type> parameter specifies the digest to
  30. be used, such as EVP_sha1(). The B<md> is a pointer to the buffer where the
  31. digest will be copied and is assumed to be large enough; the constant
  32. B<EVP_MAX_MD_SIZE> is suggested. The B<len> parameter, if not NULL, points
  33. to a place where the digest size will be stored.
  34. =head1 RETURN VALUES
  35. All functions described here return 1 for success and 0 for failure.
  36. =head1 SEE ALSO
  37. L<EVP_sha1(3)>
  38. =head1 COPYRIGHT
  39. Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
  40. Licensed under the OpenSSL license (the "License"). You may not use
  41. this file except in compliance with the License. You can obtain a copy
  42. in the file LICENSE in the source distribution or at
  43. L<https://www.openssl.org/source/license.html>.
  44. =cut