GENERAL_NAME(3ossl)

πŸ’– GENERAL_NAME(3ossl) β€” the OpenSSL girlies' guide πŸ’–

okay so bestie, this is a page from the OpenSSL manual β€” it lives under the name GENERAL_NAME(3ossl) β€” and it's all about the GENERAL_NAME method routines. it's short, it's sweet, it's giving "one function that does one thing and does it well" ✨


🌸 NAME 🌸

GENERAL_NAME, GENERAL_NAME_set1_X509_NAME β€” the GENERAL_NAME method routines, aka the lil' helpers that handle your GENERAL_NAME business πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

like, here's literally everything you need to include and call:

#include <openssl/x509v3.h>

typedef struct GENERAL_NAME_st GENERAL_NAME;

int GENERAL_NAME_set1_X509_NAME(GENERAL_NAME **tgt, const X509_NAME *src);

copy that exactly, don't freestyle the signature, i'm watching πŸ‘€


πŸ¦‹ DESCRIPTION πŸ¦‹

so GENERAL_NAME_set1_X509_NAME() does the thing where it creates a brand new GENERAL_NAME of type GEN_DIRNAME and populates it based on the X509_NAME you hand it as src β€” and yes, src can be NULL, that's allowed, no judgment.

one thing though, and this is important: tgt must not be NULL. like, hard no. don't do that.

and if it all goes well? if successful, *tgt will be set to point to the newly created GENERAL_NAME. so cute. so tidy. main character energy fr fr 🫢


✨ RETURN VALUES ✨

  • 1 β€” slay, success, we ate πŸ’…
  • 0 β€” error, it's giving 😭

πŸ‘‘ HISTORY πŸ‘‘

GENERAL_NAME_set1_X509_NAME() was added in OpenSSL 3.4. so if you're on something older, that's a you problem, bestie πŸ™ˆ


Copyright 2007-2024 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>.

not me reminding you to actually read the license. iykyk. πŸ’€

and that's the whole vibe check, bestie 🌈 β€” this page is from OpenSSL 3.5.9, dated 2026-09-29. go forth and set your GENERAL_NAMEs. mwah πŸ’–πŸ§šβ­

πŸ“¦ where this page comes from