Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix cross-nightly manual

This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.

NAME

SMIME_text — remove text/plain MIME headers

SYNOPSIS

#include <openssl/asn1.h>
int
SMIME_text(BIO *in_bio, BIO *out_bio);

DESCRIPTION

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”.

SEE ALSO

SMIME_crlf_copy(3), SMIME_read_ASN1(3)

HISTORY

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

CAVEATS

SMIME_text() does not support non-blocking BIOs.
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org