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

a2d_ASN1_OBJECT
DER content octets of an ASN.1 object identifier

int
a2d_ASN1_OBJECT(unsigned char *der_out, int olen, const char *val_in, int ilen);

a2d_ASN1_OBJECT() accepts an ASCII string val_in of ilen bytes and interprets it as the numerical form of an ASN.1 object identifier. It writes the content octets of the DER encoding of the object identifier to the buffer der_out which is olen bytes long. The identifier and length octets of the DER encoding are not written.

If ilen is -1, the strlen(3) of val_in is used instead.

If der_out is a NULL pointer, writing the content objects is skipped and only the return value is calculated.

a2d_ASN1_OBJECT() returns the number of content octets that were or would be written or 0 if ilen is 0, if val_in is not a valid representation of an object identifier, if memory allocation fails, or if the number of content octets would be larger than olen.

ASN1_OBJECT_new(3), i2d_ASN1_OBJECT(3), OBJ_create(3)

ITU-T Recommendation X.690, also known as ISO/IEC 8825-1: Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER), section 8.19: Encoding of an object identifier value

a2d_ASN1_OBJECT() first appeared in SSLeay 0.8.0 and has been available since OpenBSD 2.4.
January 1, 2022 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.