PKCS7_GET_OCTET_STRING(3ossl)
okay bestie, welcome to the PKCS7_GET_OCTET_STRING(3ossl) page β yes, that's the manual name, and yes, we're getting into it π
π NAME π
PKCS7_get_octet_string β returns an octet string from a PKCS#7 envelopedData structure. That's the whole errand, no cap. β¨
β¨ SYNOPSIS β¨
#include <openssl/pkcs7.h>
ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7);
π¦ DESCRIPTION π¦
PKCS7_get_octet_string() hands you a pointer to an ASN1 octet string from a PKCS#7 envelopedData structure. Slay.
If the structure cannot be parsed, it returns NULL β that's the βnope, couldn't parse thisβ moment π.
π NOTES π
As the 0 implies, PKCS7_get_octet_string() returns internal pointers, and the caller should not free them. Like, hands off, bestie β do not free() these. π«Ά
π₯ RETURN VALUES π₯
PKCS7_get_octet_string() returns an ASN1_OCTET_STRING pointer. And if parsing fails, remember that NULL from DESCRIPTION β vibe check failed, but the function still returned its pointer type. π
π SEE ALSO π
PKCS7_type_is_data(3) β go read that next, iykyk.
π COPYRIGHT π
Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
That's the PKCS7_GET_OCTET_STRING(3ossl) tea, fresh from OpenSSL 3.5.0, dated 2026-09-25 π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms