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_PACK(3) FreeBSD Library Functions Manual ASN1_ITEM_PACK(3)

ASN1_item_pack, ASN1_item_unpack
pack an ASN.1 object into an ASN1_STRING

#include <openssl/asn1.h>

ASN1_STRING *
ASN1_item_pack(void *val_in, const ASN1_ITEM *it, ASN1_STRING **string_out);

void *
ASN1_item_unpack(const ASN1_STRING *string_in, const ASN1_ITEM *it);

ASN1_item_pack() encodes the object pointed to by val_in into DER format using ASN1_item_i2d(3) and stores the encoded form in **string_out. If string_out or *string_out is a NULL pointer, a new ASN1_STRING object is allocated and returned.

ASN1_item_unpack() interprets the data in string_in as a DER- or BER-encoded byte array and decodes one value of the type it into a newly allocated object using ASN1_item_d2i(3).

ASN1_item_pack() returns the modified or new object or NULL if memory allocation or encoding fails.

ASN1_item_unpack() returns the new object or NULL if memory allocation or decoding fails.

ASN1_item_d2i(3), ASN1_item_new(3), ASN1_STRING_new(3)

ASN1_item_pack() and ASN1_item_unpack() first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 3.2.

See the BUGS section in ASN1_item_i2d(3).
November 15, 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.