X509_GET0_UIDS(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’– X509_GET0_UIDS(3ossl) πŸ’–

okay so bestie, real talk: we're deep in the OpenSSL corner of the man pages, section 3ossl, and today's main character is a tiny little page about unique identifiers in certificates and attribute certificates. yes, that kind of unique identifier. no, not a UUID. sit down, I'll explain. πŸŽ€

✨ 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);
=head1 DESCRIPTION

so yeah, two different headers depending on which one you're calling β€” openssl/x509.h for the classic cert one, openssl/x509_acert.h for the attribute-certificate one. and yes, that trailing =head1 DESCRIPTION is literally sitting there in the synopsis, it's a little POD artifact that's been vibing in there. not me pointing it out πŸ’€ just copy what you need from the code above and move on.

🌸 DESCRIPTION 🌸

X509_get0_uids() sets *piuid and *psuid to the issuer and subject unique identifiers of certificate x β€” or NULL if the fields are not present. it doesn't hand you the values back, it writes them into your pointers, so pass in the addresses of your const ASN1_BIT_STRING * variables and let it do its thing. slay. ✨

X509_ACERT_get0_issuerUID() returns the issuer unique identifier of the attribute certificate x β€” or NULL if the field is not present. that one's a plain return value, no out-parameters, very low-effort-queen of it. πŸ‘‘

πŸ’… NOTES πŸ’…

the issuer and subject unique identifier fields are very rarely encountered in practice outside test cases. like, genuinely rare. if you're seeing one in the wild, that's an event. screenshot it. 🫢

πŸ’€ RETURN VALUES πŸ’€

  • X509_get0_uids() does not return a value. it's a void function. it returns nothing, and it's at peace with that.
  • X509_ACERT_get0_issuerUID() returns a unique identifier on success or NULL on failure.

🌈 SEE ALSO 🌈

the whole friend group, fr fr:

⭐ HISTORY ⭐

  • X509_get0_uids() was added in OpenSSL 1.1.0. vintage. ✨
  • X509_ACERT_get0_issuerUID() was added in OpenSSL 3.4. new girl on the block. πŸ’…

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


and that's the whole page, bestie πŸ§šπŸ’œ this version is 3.5.0, dated 2026-09-25, straight from the X509_GET0_UIDS(3ossl) corner of the OpenSSL docs β€” go forth and get those uids, mwah πŸ“

πŸ“¦ where this page comes from