ASN1_STRING_NEW(3SSL)
π ASN1_STRING_NEW π
okay bestie, welcome to the ASN1_STRING_NEW page from the OpenSSL manual, section 3SSL β¨ this is the little trio of functions that literally just allocate and free ASN1_STRING structures, no cap π
πΈ NAME πΈ
ASN1_STRING_new, ASN1_STRING_type_new, ASN1_STRING_free β the ASN1_STRING allocation functions π
π¦ SYNOPSIS π¦
#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 β¨
so here's the tea, three lil functions, each doing one job π«Ά
ASN1_STRING_new()β returns an allocatedASN1_STRINGstructure. its type is undefined, like it literally hasn't decided who it is yet π main character in their flop era fr.ASN1_STRING_type_new()β returns an allocatedASN1_STRINGstructure of typetype. you tell it who it is πASN1_STRING_free()β frees upa. and ifaisNULL, nothing is done β it's giving "no thoughts, head empty", iconic, no crash, periodt π
π NOTES π
the other string types lowkey just call the ASN1_STRING functions underneath, it's all one big friend group π
for example, ASN1_OCTET_STRING_new() calls:
ASN1_STRING_type_new(V_ASN1_OCTET_STRING)
see? it's giving delegation. obsessed π
β RETURN VALUES β
ASN1_STRING_new()andASN1_STRING_type_new()return a validASN1_STRINGstructure, orNULLif an error occurred π (iykyk, always check for thatNULL)ASN1_STRING_free()does not return a value. it just vibes and cleans up π§
π₯ SEE ALSO π₯
π 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>.
and that's the whole page bestie, you ate that π this was OpenSSL 4.0.3, dated 2026-09-29, mwah, go forth and allocate responsibly πβ¨π
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms