GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ASN1_ITEM_DIGEST(3) FreeBSD Library Functions Manual ASN1_ITEM_DIGEST(3)

ASN1_item_digest
DER-encode and hash an ASN.1 value

#include <openssl/x509.h>

int
ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *val_in, unsigned char *md, unsigned int *s);

ASN1_item_digest() assumes that that val_in is an ASN1_VALUE of the type specified by it, encodes it into DER format by calling ASN1_item_i2d(3), hashes the resulting byte array using the digest type by calling EVP_Digest(3), places the digest value into *md, and, unless s is NULL, places the length in bytes of the digest into *s. Providing a buffer *md large enough to contain the digest is the responsibility of the caller; providing a buffer of EVP_MAX_MD_SIZE bytes is recommended.

ASN1_item_digest() returns 1 for success or 0 if encoding or hashing fails.

ASN1_item_i2d(3), ASN1_item_sign(3), EVP_Digest(3)

ASN1_item_digest() first appeared in OpenSSL 0.9.7 and has been available since OpenBSD 3.1.
November 7, 2021 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.