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

PEM_write_bio_ASN1_stream
generic PEM encoder

#include <openssl/asn1.h>

int
PEM_write_bio_ASN1_stream(BIO *out_bio, ASN1_VALUE *val_in, BIO *in_bio, int flags, const char *hdr, const ASN1_ITEM *it);

PEM_write_bio_ASN1_stream() writes the val_in argument of type it to out_bio in PEM format, that is, BER- and base64-encoded and surrounded by “-----BEGIN ...-----” and “-----END ...-----” lines with the hdr argument in place of the ellipses.

The flags are passed through to i2d_ASN1_bio_stream(3). In particular, if the bit SMIME_STREAM is set, streaming is performed, reading the content from in_bio. Streaming is only supported if val_in is of the type CMS_ContentInfo or PKCS7.

If the bit SMIME_STREAM is not set, the arguments in_bio and flags are ignored and distinguished encoding rules (DER) are used.

PEM_write_bio_ASN1_stream() is intended to return 1 on success or 0 on failure.

ASN1_item_i2d_bio(3), BIO_f_base64(3), BIO_new(3), i2d_ASN1_bio_stream(3), PEM_write_bio(3), PEM_write_bio_CMS_stream(3), PEM_write_bio_PKCS7_stream(3)

PEM_write_bio_ASN1_stream() first appeared in OpenSSL 1.0.0 and has been available since OpenBSD 4.9.

Many kinds of errors are silently ignored. This function may return 1 even if it only produced partial output or no output at all.
December 13, 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.