libressl-SMIME_text(3)

libressl-SMIME_text3

Remove text/plain mime headers

Usage

Crypto Library (libcrypto, -lcrypto)

#include <openssl/asn1.h>

int

SMIME_text(BIO *in_bio, BIO *out_bio);

Overview

SMIME_text() reads MIME headers from in_bio, checks that the content type is “text/plain”, discards the MIME headers, and copies the text that follows the headers from in_bio to out_bio.

Return values

SMIME_text() returns 1 on success or 0 if memory allocation, reading the input, or parsing the MIME headers fails, if there is no “content-type” header, or if the content type is not “text/plain”.

Caveats

SMIME_text() does not support non-blocking BIOs.

History

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

From libressl 4.4.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.