X509_ACERT_G...ER_BASECERTID(3ossl)
π 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 β¨
okay so bestie, you're reading X509_ACERT_G...ER_BASECERTID(3ossl) and honestly? iconic topic. we're talking about the holder identity of an attribute certificate β who even is this cert for, yk? let's get into it π«Ά
πΈ 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 π
these routines set and get the holder identity of an X509 attribute certificate. no cap.
X509_ACERT_set0_holder_entityName()β sets the identity as aGENERAL_NAMEname πX509_ACERT_set0_holder_baseCertId()β sets the identity based on the issuer and serial number of a certificate detailed inisssπX509_ACERT_set0_holder_digest()β sets the holder entity based on digest informationdinfoπ§
and likeβ¦ RFC 5755 section 4.2.2 recommends that you only use ONE of the above methods to set the holder identity for a given attribute certificate x. but bestie, setting multiple methods at the same time is literally possible. so it's on the application to handle cases where conflicting identity information gets specified using different methods. no one's gonna stop you, but the chaos is yours to manage π
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(). get you a function that just hands you the pointer π«Ά
β¨ the OSSL_ISSUER_SERIAL moment β¨
a OSSL_ISSUER_SERIAL object holds the subject name and UID of a certificate issuer and a certificate's serial number.
OSSL_ISSUER_SERIAL_set1_issuer()β copies the issuer into the structureOSSL_ISSUER_SERIAL_set1_issuerUID()β copies the UID into the structureOSSL_ISSUER_SERIAL_set1_serial()β copies the serial into the structure
heads up: the application is responsible for freeing its own copy of these values after use. you brought it, you clean it up π
and the getters:
OSSL_ISSUER_SERIAL_get0_issuer()β returns a pointer to the issuer in the objectOSSL_ISSUER_SERIAL_get0_issuerUID()β returns a pointer to the issuer UID in the objectOSSL_ISSUER_SERIAL_get0_serial()β returns a pointer to the serial in the object
π¦ the OSSL_OBJECT_DIGEST_INFO moment π¦
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 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. slay. that's it, that's the field. β
π RETURN VALUES π
- all the
set0/set1routines return1for success and0for failure β - all the
get0functions return a pointer to the object's inner structure π«΄
do NOT free these pointers after use. they're not yours, they're the object's. respect the boundaries bestie π
β NOTES β
although the value of OSSL_OBJECT_DIGEST_INFO_OTHER is defined in RFC 5755, its use is prohibited for conformant attribute certificates. it's giving "technically in the spec, absolutely not allowed". periodt. π
π HISTORY π
these functions were added in OpenSSL 3.4. glow up era π
π 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>.
okay that's the whole page, bestie!! π this was the 3.5.9 edition, dated 2026-09-2X, and yeah the manual name is lowkey a mouthful β X509_ACERT_G...ER_BASECERTID(3ossl) β but you ate that. go forth and set your holder fields responsibly, one method at a time, 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