GENERAL_NAME(3SSL)

πŸ’– NAME πŸ’–

okay bestie, gather round β€” this is GENERAL_NAME and GENERAL_NAME_set1_X509_NAME, the GENERAL_NAME method routines from the OpenSSL fam (that's the 3SSL manual, for the record πŸŽ€). she's small, she's focused, she does one thing and she eats. periodt.


✨ SYNOPSIS ✨

#include <openssl/x509v3.h>

typedef struct GENERAL_NAME_st GENERAL_NAME;

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

like look at her. two lines of actual code and a typedef. lowkey iconic πŸ’…


🌸 DESCRIPTION 🌸

so GENERAL_NAME_set1_X509_NAME() does the thing where it creates a brand new GENERAL_NAME of type GEN_DIRNAME, and then fills it up based on the X509_NAME you hand it as src. and yes, src is allowed to be NULL β€” she's flexible like that πŸ¦‹

not me β€” tgt though? tgt must not be NULL. no cap, that one is non-negotiable πŸ™ˆ

and if everything goes right, *tgt gets pointed at that freshly created GENERAL_NAME. new general name just dropped, she's the main character now πŸ‘‘


πŸ”₯ RETURN VALUES πŸ”₯

  • 1 β€” slay, success ✨
  • 0 β€” nope, error πŸ’€

πŸŽ€ HISTORY πŸŽ€

GENERAL_NAME_set1_X509_NAME() was added in OpenSSL 3.4. so if you're on something older she simply does not exist yet, sorry 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>.


and that's the whole page, we're done here 🫢 huge shoutout to OpenSSL 4.0.3, dropped 2026-09-29, GENERAL_NAME(3SSL) girlies stay winning πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from