SMIME_TEXT(3)
π SMIME_TEXT(3) β Library Functions Manual, but make it main character π
okay so bestie, this is the manual page for SMIME_TEXT(3) from the Library Functions Manual, and it's giving "tiny utility, very specific job." No cap: if you need to strip text/plain MIME headers, this is your girl. π
β¨ NAME β¨
SMIME_text β remove text/plain MIME headers. That's it, that's the whole vibe: the MIME headers get discarded and the actual text gets to shine. π
πΈ SYNOPSIS πΈ
library βlibcryptoβ #include <openssl/asn1.h>
int
SMIME_text(BIO *in_bio, BIO *out_bio);
π¦ DESCRIPTION π¦
So SMIME_text() rolls up to in_bio, reads the MIME headers, and checks that the content type is text/plain. If that checks out, it discards those MIME headers like last season's drama and copies the text that follows the headers from in_bio to out_bio. Literally remove headers, keep the text, slay. β¨
π RETURN VALUES π
SMIME_text() returns 1 on success. Iconic. It returns 0 if any of these happen:
- memory allocation fails π
- reading the input fails π
- parsing the MIME headers fails π
- there is no
content-typeheader π - the content type is not
text/plainπ
No in-between, no ambiguous vibe check β just 1 or 0, periodt. π
π₯ SEE ALSO π₯
Go read those if you want the whole friend group lore. π«Ά
π HISTORY π
SMIME_text() first appeared in OpenSSL 1.0.0 and has been available since OpenBSD 4.9. Respect the veteran status, honestly. π
π CAVEATS π
Warning:SMIME_text()does not support non-blockingBIOs. Like, do not try to make it do the non-blocking thing β that is not its era, bestie. π
xoxo, your Debian bestie π β June 11, 2025
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms