X509_GET0_UIDS(3ossl)
π X509_GET0_UIDS β the 3ossl girlies' guide to unique identifiers π
okay so bestie, welcome to X509_GET0_UIDS(3ossl) β yes that's the manual name, it's giving very "long name, tiny job" energy and honestly? we love that for us. πΈ
This page is about two little functions that go grab the unique identifiers off of certificates and attribute certificates. That's it. That's the whole gig. But we're gonna do it properly, mwah. π
β¨ NAME β¨
X509_get0_uids, X509_ACERT_get0_issuerUID β get certificate and attribute certificate unique identifiers π
π SYNOPSIS π
#include <openssl/x509.h>
void X509_get0_uids(const X509 *x, const ASN1_BIT_STRING **piuid,
const ASN1_BIT_STRING **psuid);
#include <openssl/x509_acert.h>
ASN1_BIT_STRING *X509_ACERT_get0_issuerUID(X509_ACERT *x);
see how the two functions live in different headers? yeah. x509.h for the cert one, x509_acert.h for the attribute cert one. don't mix 'em up bestie, the compiler will absolutely clock you. π
π DESCRIPTION π
π¦ X509_get0_uids()
okay so this one is a setter-of-pointers situation. You hand it a certificate x, plus two const ASN1_BIT_STRING ** out-params, piuid and psuid.
What it does: it sets *piuid and *psuid to the issuer and subject unique identifiers of the certificate x β respectively, obviously, because order matters and we are not chaotic here.
And if those fields are not present? It sets them to NULL. no drama, no error, just NULL. β¨
πΈ X509_ACERT_get0_issuerUID()
this one's the attribute-certificate cousin. You pass it an attribute certificate x, and it returns the issuer unique identifier of that attribute certificate x.
Field not present? NULL. same energy, different struct. π«Ά
π NOTES π
ngl bestie, these fields are very rarely encountered in practice outside of test cases. The issuer and subject unique identifier fields basically only show up when somebody's deliberately poking at them in tests. If you're seeing one in the wild, take a picture, it's basically a celebrity sighting. πΈπ
β RETURN VALUES β
X509_get0_uids()β does not return a value. void. nothing. it communicates entirely through the pointers you gave it. main character who lets the work speak for itself. πX509_ACERT_get0_issuerUID()β returns a unique identifier on success, orNULLon failure. classic. π
π SEE ALSO π
go read these next, bestie, they're all in the same friend group:
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 π§
X509_get0_uids()β added in OpenSSL 1.1.0. an elder. a legend. πX509_ACERT_get0_issuerUID()β added in OpenSSL 3.4. the baby of the family, still fresh. π
π 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>.
okay that's the whole page, you ate that, periodt. πβ¨
this was brought to you by X509_GET0_UIDS(3ossl) from OpenSSL 3.5.9, dated 2026-09-29 β stay slay, stay linked, and always set your out-params to NULL. mwah πππ¦
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms