X509_GET0_UIDS(3SSL)
π X509_GET0_UIDS π
okay so bestie, welcome to the X509_GET0_UIDS(3SSL) page β yeah it's an OpenSSL manual, section 3SSL, and it's short but it's lowkey important, so grab your iced coffee and let's go π«Ά
β¨ NAME β¨
X509_get0_uids, X509_ACERT_get0_issuerUID β they get you the unique identifiers off a certificate and off an attribute certificate. that's the whole job. no notes. periodt π
β¨ SYNOPSIS β¨
first up, the regular certificate flavour β you gotta include the x509 header:
#include <openssl/x509.h>
void X509_get0_uids(const X509 *x, const ASN1_BIT_STRING **piuid,
const ASN1_BIT_STRING **psuid);
then the attribute certificate flavour, which lives in its own header (iconic of it, honestly):
#include <openssl/x509_acert.h>
ASN1_BIT_STRING *X509_ACERT_get0_issuerUID(X509_ACERT *x);
β¨ DESCRIPTION β¨
so here's the tea β
X509_get0_uids() takes the certificate x and it sets *piuid and *psuid to the issuer and subject unique identifiers of that certificate. but bestie, if those fields aren't present? it just sets them to NULL. no drama, no error, just NULL. respect honestly.
X509_ACERT_get0_issuerUID() is the attribute-certificate girlie: it returns the issuer unique identifier of the attribute certificate x, or NULL if that field isn't there. that's it, that's the function π
β¨ NOTES β¨
ngl, the issuer and subject unique identifier fields are very rarely encountered in practice outside of test cases. likeβ¦ literally basically never in the wild. it's giving "only shows up in unit tests" energy π so don't be shocked if you go your whole career without seeing one.
β¨ RETURN VALUES β¨
X509_get0_uids()β does not return a value. it's avoidfunction, it just fills in your pointers and moves on. main character, zero cardio πX509_ACERT_get0_issuerUID()β returns a unique identifier on success, orNULLon failure. so likeβ¦ always check it, bestie π
β¨ SEE ALSO β¨
go read these next, they're all connected, iykyk π¦
d2i_X509(3), ERR_get_error(3), X509_CRL_get0_by_serial(3), X509_get0_signature(3), X509_get_ext_d2i(3), X509_get_extension_flags(3), X509_get_pubkey(3), X509_get_subject_name(3), X509_get_version(3), X509_NAME_add_entry_by_txt(3), X509_NAME_ENTRY_get_object(3), X509_NAME_get_index_by_NID(3), X509_NAME_print_ex(3), X509_new(3), X509_sign(3), X509V3_get_d2i(3), X509_verify_cert(3)
β¨ HISTORY β¨
a lil glow-up timeline for you π
X509_get0_uids()β added in OpenSSL 1.1.0. so it's been around a minute.X509_ACERT_get0_issuerUID()β added in OpenSSL 3.4. the new girl on the block β¨
β¨ COPYRIGHT β¨
Copyright 2015-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>.
bestie this is the legal bit so i'm gonna say it straight: use it only in compliance with the License, fr fr. no cap. π
and that's the whole page!! this was OpenSSL 4.0.3, dated 2026-09-29, from the X509_GET0_UIDS(3SSL) manual β slay, thanks for reading, go forth and check your NULLs πβ¨π
π¦ 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