ASN1_OBJECT_NEW(3SSL)
π ASN1_OBJECT_NEW β the 3SSL manual, bestie edition β¨
okay so this is the page for ASN1_OBJECT_new and ASN1_OBJECT_free, aka the object allocation functions β yes the whole page is literally about making and yeeting an ASN1_OBJECT. it's short. it's iconic. let's go π«Ά
π NAME π
ASN1_OBJECT_new, ASN1_OBJECT_free β the object allocation functions π
πΈ SYNOPSIS πΈ
like, the whole vibe in code form:
#include <openssl/asn1.h>
void ASN1_OBJECT_free(ASN1_OBJECT *a);
and now the sad part π β the following functions have been deprecated since OpenSSL 4.0, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7):
ASN1_OBJECT *ASN1_OBJECT_new(void);
heads up bestie: that second one is on the deprecated list. it's giving legacy. it's giving "why are you still calling me". but we'll get there π
π¦ DESCRIPTION π¦
so the ASN1_OBJECT allocation routines allocate and free an ASN1_OBJECT structure, and that structure represents an ASN1 OBJECT IDENTIFIER. that's the whole job description. that's the assignment π
ASN1_OBJECT_new()is deprecated and exists for legacy backward compatibility reasons β and it always returnsNULL. not sometimes. not "if it feels like it". always. it is fr fr not doing the thing you want π€‘ASN1_OBJECT_free()frees up theASN1_OBJECTstructurea. and ifaisNULL, nothing is done β no crash, no drama, no nothing. it just looks at theNULLand walks away. main character energy honestly β¨
β NOTES β
okay so this is the part where I hold your hand gently π«Ά
even though ASN1_OBJECT_new() allocates a new ASN1_OBJECT structure, it is almost never used in applications. like, basically never. the ASN1 object utility functions such as OBJ_nid2obj() are used instead. so if you were about to reach for ASN1_OBJECT_new(), bestie, put it down. lowkey OBJ_nid2obj() is the moment. iykyk π
π RETURN VALUES π
ASN1_OBJECT_new()always returnNULL. yes, "return", singular verb, that's the manpage's grammar, we respect it π and yes,NULL. every time. no cap.ASN1_OBJECT_free()returns no value. it just does the deed and leaves. silent. mysterious. iconic π₯
π SEE ALSO π
d2i_ASN1_OBJECT(3) β go read that one next, bestie, it's the friend this page keeps pointing at πΈ
π HISTORY π
ASN1_OBJECT_new() was deprecated in OpenSSL 4.0. that's the lore. that's the timeline π°οΈ
π COPYRIGHT π
Copyright 2002-2026 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 page!! β¨ this wasASN1_OBJECT_NEWfrom the OpenSSL3SSLmanual, version 4.0.3, dated 2026-09-29. slay, go free your objects 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