ASN1_STRING_NEW(3ossl)
π ASN1_STRING_NEW β it's giving "OpenSSL manual, section 3ossl" β¨
Bestie, welcome to the ASN1_STRING_NEW(3ossl) page β yes that's the manual name, section 3ossl, she's an OpenSSL girlie. Sit down, grab a boba, we're allocating structs today π§
πΈ NAME πΈ
ASN1_STRING_new, ASN1_STRING_type_new, ASN1_STRING_free β the ASN1_STRING allocation functions, aka the holy trinity of "make one", "make one with a vibe", and "bestie, delete it" π
π¦ SYNOPSIS π¦
Like, the literal receipts, no cap:
#include <openssl/asn1.h>
ASN1_STRING *ASN1_STRING_new(void);
ASN1_STRING *ASN1_STRING_type_new(int type);
void ASN1_STRING_free(ASN1_STRING *a);
π DESCRIPTION π
Okay so, here's the tea β
ASN1_STRING_new()β hands you back an allocatedASN1_STRINGstructure. Its type is undefined, so like... she exists, but she doesn't know who she is yet. Very relatable, honestly π«ΆASN1_STRING_type_new()β same deal, allocatedASN1_STRINGstructure, but this time she's of typetype. Main character energy, fully self-actualized β¨ASN1_STRING_free()β frees upa. And ifaisNULL? Nothing is done. She said "not my problem, no notes" π
β NOTES β
Other string types literally call these ASN1_STRING functions β it's giving nepotism but make it cryptography π
For example, ASN1_OCTET_STRING_new() calls ASN1_STRING_type_new(V_ASN1_OCTET_STRING). See? Iconic behavior. Iykyk π
π₯ RETURN VALUES π₯
ASN1_STRING_new()andASN1_STRING_type_new()return a validASN1_STRINGstructure β slay π β orNULLif an error occurred πASN1_STRING_free()does not return a value. She gives nothing and that's the point π
π SEE ALSO π
ERR_get_error(3)β for when things go sideways and you need to know why, bestie π
Fr fr, bookmark that one. You'll need it.
π COPYRIGHT π
Copyright 2002-2023 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>.
Mwah π that's the whole page β version 3.5.6, dated 2026-04-07, served fresh with love. Go forth and allocate responsibly, queen π¦β¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms