X509_ACERT_G...ER_BASECERTID(3ossl)
๐ธ X509_ACERT_G...ER_BASECERTID โ the OpenSSL 3ossl manual, bestie edition ๐ธ
okay so this is the 3ossl manpage for X509_ACERT_get0_holder_baseCertId and its whole friend group ๐
like, it's the OpenSSL docs but make it make sense.
โจ NAME โจ
X509_ACERT_get0_holder_baseCertId, X509_ACERT_get0_holder_digest, X509_ACERT_get0_holder_entityName, X509_ACERT_set0_holder_baseCertId, X509_ACERT_set0_holder_digest, X509_ACERT_set0_holder_entityName, OSSL_ISSUER_SERIAL_get0_issuer, OSSL_ISSUER_SERIAL_get0_issuerUID, OSSL_ISSUER_SERIAL_get0_serial, OSSL_ISSUER_SERIAL_set1_issuer, OSSL_ISSUER_SERIAL_set1_issuerUID, OSSL_ISSUER_SERIAL_set1_serial, OSSL_OBJECT_DIGEST_INFO_get0_digest, OSSL_OBJECT_DIGEST_INFO_set1_digest โ get and set Attribute Certificate holder fields ๐
that's the whole squad. every single one. no cap.
๐ฆ SYNOPSIS ๐ฆ
#include <openssl/x509_acert.h>
const GENERAL_NAMES *X509_ACERT_get0_holder_entityName(const X509_ACERT *x);
OSSL_ISSUER_SERIAL *X509_ACERT_get0_holder_baseCertId(const X509_ACERT *x);
OSSL_OBJECT_DIGEST_INFO * X509_ACERT_get0_holder_digest(const X509_ACERT *x);
void X509_ACERT_set0_holder_entityName(X509_ACERT *x, GENERAL_NAMES *name);
void X509_ACERT_set0_holder_baseCertId(X509_ACERT *x, OSSL_ISSUER_SERIAL *isss);
void X509_ACERT_set0_holder_digest(X509_ACERT *x,
OSSL_OBJECT_DIGEST_INFO *dinfo);
X509_NAME *OSSL_ISSUER_SERIAL_get0_issuer(OSSL_ISSUER_SERIAL *isss);
ASN1_INTEGER *OSSL_ISSUER_SERIAL_get0_serial(OSSL_ISSUER_SERIAL *isss);
ASN1_BIT_STRING *OSSL_ISSUER_SERIAL_get0_issuerUID(OSSL_ISSUER_SERIAL *isss);
int OSSL_ISSUER_SERIAL_set1_issuer(OSSL_ISSUER_SERIAL *isss, X509_NAME *issuer);
int OSSL_ISSUER_SERIAL_set1_serial(OSSL_ISSUER_SERIAL *isss, ASN1_INTEGER *serial);
int OSSL_ISSUER_SERIAL_set1_issuerUID(OSSL_ISSUER_SERIAL *isss, ASN1_BIT_STRING *uid);
void OSSL_OBJECT_DIGEST_INFO_get0_digest(OSSL_OBJECT_DIGEST_INFO *o,
ASN1_ENUMERATED **digestedObjectType,
X509_ALGOR **digestAlgorithm,
ASN1_BIT_STRING **digest);
void OSSL_OBJECT_DIGEST_INFO_set1_digest(OSSL_OBJECT_DIGEST_INFO *o,
ASN1_ENUMERATED *digestedObjectType,
X509_ALGOR *digestAlgorithm,
ASN1_BIT_STRING *digest);
๐ DESCRIPTION ๐
so these routines set and get the holder identity of an X509 attribute certificate. it's giving "who even IS this acert for" energy, and honestly? iconic.
X509_ACERT_set0_holder_entityName() sets the identity as a GENERAL_NAME name. X509_ACERT_set0_holder_baseCertId() sets the identity based on the issuer and serial number of a certificate detailed in isss. and X509_ACERT_set0_holder_digest() sets the holder entity based on digest information dinfo. three different lil methods, same goal ๐ซถ
ngl,RFC 5755section4.2.2recommends that only one of the above methods be used to set the holder identity for a given attribute certificatex. but bestieโฆ setting multiple methods at the same time is literally possible. so yeah, it's up to the application to handle cases when conflicting identity information is specified using different methods. that's on you, not on OpenSSL ๐
pointers to the internal structures describing the holder identity of attribute certificate x can be retrieved with X509_ACERT_get0_holder_entityName(), X509_ACERT_get0_holder_baseCertId(), and X509_ACERT_get0_holder_digest(). get0, get outta here โจ
an OSSL_ISSUER_SERIAL object holds the subject name and UID of a certificate issuer and a certificate's serial number. okay so:
OSSL_ISSUER_SERIAL_set1_issuer(),OSSL_ISSUER_SERIAL_set1_issuerUID(), andOSSL_ISSUER_SERIAL_set1_serial()respectively copy these values into theOSSL_ISSUER_SERIALstructure. and bestie, the application is responsible for freeing its own copy of these values after use. don't forget. i'm serious. ๐ซถOSSL_ISSUER_SERIAL_get0_issuer(),OSSL_ISSUER_SERIAL_get0_issuerUID(), andOSSL_ISSUER_SERIAL_get0_serial()return pointers to these values in the object. no copies, just pointers. lowkey efficient ๐
an OSSL_OBJECT_DIGEST_INFO object holds a digest of data to identify the attribute certificate holder. OSSL_OBJECT_DIGEST_INFO_set1_digest() sets the digest information of the object. the type of digest information is given by digestedObjectType, and it can be one of:
OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEYโ Hash of a public key ๐OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY_CERTโ Hash of a public key certificate ๐OSSL_OBJECT_DIGEST_INFO_OTHERโ Hash of another object. See NOTES below. ๐
digestAlgorithm indicates the algorithm used to compute digest. like, which math did the hashing, bestie ๐งฎ
๐ฅ RETURN VALUES ๐ฅ
- All
set0/set1routines return1for success and0for failure. periodt. - All
get0functions return a pointer to the object's inner structure. โจ
major warning: these pointers must not be freed after use. do not free them. not even a little. not even ironically. ๐ญ
๐ NOTES ๐
although the value of OSSL_OBJECT_DIGEST_INFO_OTHER is defined in RFC 5755, its use is prohibited for conformant attribute certificates. so likeโฆ it exists, but it's not invited to the party ๐
๐ HISTORY ๐
these functions were added in OpenSSL 3.4. so they're new-ish. fresh off the shelf ๐
๐ COPYRIGHT ๐
Copyright 2023-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>.
aaaand that's the page, bestie ๐ง๐ sign-off time: this was the OpenSSL 3.5.0 manual, dated 2026-09-2X, and yes the footer says X509_ACERT_G...ER_BASECERTID(3ossl) all over again because manpages are dramatic like that ๐
โจ
๐ฆ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 ยท Apache-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms