ASN1_NULL_NEW(3)

πŸ“¦ version 4.1.0, in opensuse-leap 16.0

πŸ’… ASN1_NULL_NEW(3) β€” Library Functions Manual πŸ’…

🌸 NAME 🌸

ASN1_NULL_new, ASN1_NULL_free β€” the ASN.1 NULL value, bestie πŸ’–

✨ SYNOPSIS ✨

#include <openssl/asn1.h>

ASN1_NULL *
ASN1_NULL_new(void);

void
ASN1_NULL_free(ASN1_NULL *val_in);

πŸŽ€ DESCRIPTION πŸŽ€

Okay so ASN1_NULL_new() is lowkey iconic: it returns a specific invalid pointer that represents the ASN.1 NULL value. That is the only possible value of the ASN.1 NULL type, periodt. That pointer is different from a NULL pointer. Dereferencing it almost certainly results in a segmentation fault β€” so, like, don’t do that, bestie. πŸ’€ This function does not allocate memory and cannot fail. Slay.

⚠️ Real talk: that invalid pointer is not a normal pointer. Dereferencing it almost certainly results in a segmentation fault.

ASN1_NULL_free() has no effect whatsoever. Like, none. In particular, it ignores the val_in argument and does not free any memory. In normal use, application programs only pass the invalid pointer obtained from ASN1_NULL_new() to this function. But even if a valid pointer is passed, that pointer does not become invalid. No cap. πŸ¦‹

The ASN.1 NULL type is also represented by the V_ASN1_NULL type identifier constant.

🌈 SEE ALSO 🌈

⭐ STANDARDS ⭐

ITU-T Recommendation X.208, also known as ISO/IEC 8824-1: Specification of Abstract Syntax Notation One (ASN.1), section 19: Notation for the null type

πŸ‘‘ HISTORY πŸ‘‘

ASN1_NULL_new() and ASN1_NULL_free() first appeared in OpenSSL 0.9.5 and have been available since OpenBSD 2.7.


Okay bye bestie πŸ’– this page is from Debian, dated December 9, 2021, and the manual page is ASN1_NULL_NEW(3) β€” mwah πŸ’…βœ¨

πŸ“¦ where this page comes from