ASN1_STRING_TABLE_ADD(3SSL)
π ASN1_STRING_TABLE_ADD β the OpenSSL one, bestie π
okay so this is a page straight out of the OpenSSL manual, and it's all about the ASN1_STRING_TABLE situation. Three whole functions, one struct, zero chill. Let's get into it. π¦
β¨ NAME β¨
ASN1_STRING_TABLE, ASN1_STRING_TABLE_add, ASN1_STRING_TABLE_get, ASN1_STRING_TABLE_cleanup β the ASN1_STRING_TABLE manipulation functions, aka the little crew that runs your string table. π
πΈ SYNOPSIS πΈ
#include <openssl/asn1.h>
typedef struct asn1_string_table_st ASN1_STRING_TABLE;
int ASN1_STRING_TABLE_add(int nid, long minsize, long maxsize,
unsigned long mask, unsigned long flags);
ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
void ASN1_STRING_TABLE_cleanup(void);
like, that's it. that's the whole vibe. copy it exactly bestie, no typos π
π DESCRIPTION π
π Types π
ASN1_STRING_TABLE is a table, right, and it holds string information for a NID object β basically the minimum size, the maximum size, the type, and etc. all bundled together like a cute little info card for your NID. β¨
π§ Functions π§
ASN1_STRING_TABLE_add()β adds a brand newASN1_STRING_TABLEitem into the local ASN1 string table, based on thenidplus all the other parameters you hand it. π«Ά
and here's the part that matters: if the item is already in the table, the fields of ASN1_STRING_TABLE get updated (depending on the values of those parameters, like, e.g., minsize and maxsize >= 0, mask and flags != 0). and if the nid is standard? then a copy of the standard ASN1_STRING_TABLE is created and updated with the other parameters. iconic behaviour honestly. π
ASN1_STRING_TABLE_get()β searches for anASN1_STRING_TABLEitem based onnid. it checks the local table first, then the standard one. no cap, that's the order. πASN1_STRING_TABLE_cleanup()β frees all theASN1_STRING_TABLEitems that were added byASN1_STRING_TABLE_add(). spring cleaning for your table, periodt. π§Ή
π RETURN VALUES π
ASN1_STRING_TABLE_add()returns1on success, and0if an error occurred. πASN1_STRING_TABLE_get()returns a validASN1_STRING_TABLEstructure, orNULLif nothing is found. πASN1_STRING_TABLE_cleanup()does not return a value. it just does its thing and leaves. π
β SEE ALSO β
π COPYRIGHT π
Copyright 2017-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>.
and that's the whole page bestie, go forth and manipulate your string tables responsibly π¦β¨
this was OpenSSL 4.0.3, dated 2026-09-29, and you just read the ASN1_STRING_TABLE_ADD(3SSL) era of the manual. stay iconic, hydrate, and read your error codes. love u, byeee ππΈ
π¦ 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