ASN1_STRING_TABLE_ADD(3ossl)

πŸ’– ASN1_STRING_TABLE_ADD πŸ’–

okay bestie, welcome to the ASN1_STRING_TABLE_ADD(3ossl) page β€” yes that's the 3ossl manual section, we're in OpenSSL land now, and honestly? this one's a little niche but it's giving structured data management and I'm kinda obsessed. πŸ¦‹


✨ NAME ✨

ASN1_STRING_TABLE, ASN1_STRING_TABLE_add, ASN1_STRING_TABLE_get, ASN1_STRING_TABLE_cleanup β€” the little ASN1_STRING_TABLE manipulation functions, aka the glow-up crew for 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);

✨ DESCRIPTION ✨

🌸 Types 🌸

ASN1_STRING_TABLE is literally just a table that holds string info β€” think minimum size, maximum size, type, and etc β€” for a NID object. it's the main character that keeps all your string facts together, periodt. ✨

πŸŽ€ Functions πŸŽ€

  • ASN1_STRING_TABLE_add() β€” adds a brand new ASN1_STRING_TABLE item into the local ASN1 string table, based on the nid plus all the other parameters you handed it. new entry, who dis. πŸ’…
  • if the item is already in the table, then the fields of ASN1_STRING_TABLE get updated instead β€” but only depending on the values of those parameters, like minsize and maxsize >= 0, and mask and flags != 0. and if the nid is standard? then a copy of the standard ASN1_STRING_TABLE gets created and updated with the other parameters. slay, no cap. 🫢
  • ASN1_STRING_TABLE_get() β€” searches for an ASN1_STRING_TABLE item based on nid. it checks the local table first, then the standard one. local first bestie, always. πŸ”
  • ASN1_STRING_TABLE_cleanup() β€” frees all the ASN1_STRING_TABLE items that were added by ASN1_STRING_TABLE_add(). it's the "clear the group chat" button, but make it memory management. 🧚

✨ RETURN VALUES ✨

  • ASN1_STRING_TABLE_add() β€” returns 1 on success, 0 if an error occurred. that's it, binary king. πŸ‘‘
  • ASN1_STRING_TABLE_get() β€” returns a valid ASN1_STRING_TABLE structure, or NULL if nothing is found. bestie came up empty, it happens. 😭
  • ASN1_STRING_TABLE_cleanup() β€” does not return a value. it just does the thing and dips. πŸ’€

✨ SEE ALSO ✨

ERR_get_error(3) β€” go read that one too, iykyk. πŸ“š


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>.

fr fr read the license, bestie, it's not optional and it's not a vibe β€” it's the rules. πŸ™ˆ

and that's the whole page, my love πŸ’œ this was OpenSSL 3.5.9, dated 2026-09-29, and yes the date is in the future, don't ask, just trust the docs. go forth and manipulate those string tables like the icon you are. πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from