1=pod 2 3=head1 NAME 4 5X509_ACERT_get0_holder_baseCertId, 6X509_ACERT_get0_holder_digest, 7X509_ACERT_get0_holder_entityName, 8X509_ACERT_set0_holder_baseCertId, 9X509_ACERT_set0_holder_digest, 10X509_ACERT_set0_holder_entityName, 11OSSL_ISSUER_SERIAL_get0_issuer, 12OSSL_ISSUER_SERIAL_get0_issuerUID, 13OSSL_ISSUER_SERIAL_get0_serial, 14OSSL_ISSUER_SERIAL_set1_issuer, 15OSSL_ISSUER_SERIAL_set1_issuerUID, 16OSSL_ISSUER_SERIAL_set1_serial, 17OSSL_OBJECT_DIGEST_INFO_get0_digest, 18OSSL_OBJECT_DIGEST_INFO_set1_digest - get and set Attribute Certificate holder fields 19 20=head1 SYNOPSIS 21 22 #include <openssl/x509_acert.h> 23 24 const GENERAL_NAMES *X509_ACERT_get0_holder_entityName(const X509_ACERT *x); 25 OSSL_ISSUER_SERIAL *X509_ACERT_get0_holder_baseCertId(const X509_ACERT *x); 26 OSSL_OBJECT_DIGEST_INFO * X509_ACERT_get0_holder_digest(const X509_ACERT *x); 27 void X509_ACERT_set0_holder_entityName(X509_ACERT *x, GENERAL_NAMES *name); 28 void X509_ACERT_set0_holder_baseCertId(X509_ACERT *x, OSSL_ISSUER_SERIAL *isss); 29 void X509_ACERT_set0_holder_digest(X509_ACERT *x, 30 OSSL_OBJECT_DIGEST_INFO *dinfo); 31 32 X509_NAME *OSSL_ISSUER_SERIAL_get0_issuer(OSSL_ISSUER_SERIAL *isss); 33 ASN1_INTEGER *OSSL_ISSUER_SERIAL_get0_serial(OSSL_ISSUER_SERIAL *isss); 34 ASN1_BIT_STRING *OSSL_ISSUER_SERIAL_get0_issuerUID(OSSL_ISSUER_SERIAL *isss); 35 int OSSL_ISSUER_SERIAL_set1_issuer(OSSL_ISSUER_SERIAL *isss, X509_NAME *issuer); 36 int OSSL_ISSUER_SERIAL_set1_serial(OSSL_ISSUER_SERIAL *isss, ASN1_INTEGER *serial); 37 int OSSL_ISSUER_SERIAL_set1_issuerUID(OSSL_ISSUER_SERIAL *isss, ASN1_BIT_STRING *uid); 38 39 void OSSL_OBJECT_DIGEST_INFO_get0_digest(OSSL_OBJECT_DIGEST_INFO *o, 40 ASN1_ENUMERATED **digestedObjectType, 41 X509_ALGOR **digestAlgorithm, 42 ASN1_BIT_STRING **digest); 43 void OSSL_OBJECT_DIGEST_INFO_set1_digest(OSSL_OBJECT_DIGEST_INFO *o, 44 ASN1_ENUMERATED *digestedObjectType, 45 X509_ALGOR *digestAlgorithm, 46 ASN1_BIT_STRING *digest); 47 48=head1 DESCRIPTION 49 50These routines set and get the holder identity of an X509 attribute certificate. 51 52X509_ACERT_set0_holder_entityName() sets the identity as a B<GENERAL_NAME> 53I<name>, X509_ACERT_set0_holder_baseCertId() sets the identity based on the 54issuer and serial number of a certificate detailed in I<isss> and 55X509_ACERT_set0_holder_digest() sets the holder entity based on digest 56information I<dinfo>. Although RFC 5755 section 4.2.2 recommends that only 57one of the above methods be used to set the holder identity for a given 58attribute certificate I<x>, setting multiple methods at the same time is 59possible. It is up to the application to handle cases when conflicting 60identity information is specified using different methods. 61 62Pointers to the internal structures describing the holder identity of 63attribute certificate I<x> can be retrieved with 64X509_ACERT_get0_holder_entityName(), X509_ACERT_get0_holder_baseCertId(), and 65X509_ACERT_get0_holder_digest(). 66 67A B<OSSL_ISSUER_SERIAL> object holds the subject name and UID of a certificate 68issuer and a certificate's serial number. OSSL_ISSUER_SERIAL_set1_issuer(), 69OSSL_ISSUER_SERIAL_set1_issuerUID(), and OSSL_ISSUER_SERIAL_set1_serial() 70respectively copy these values into the B<OSSL_ISSUER_SERIAL> structure. 71The application is responsible for freeing its own copy of these values after 72use. OSSL_ISSUER_SERIAL_get0_issuer(), OSSL_ISSUER_SERIAL_get0_issuerUID(), 73and OSSL_ISSUER_SERIAL_get0_serial() return pointers to these values in the object. 74 75An B<OSSL_OBJECT_DIGEST_INFO> object holds a digest of data to identify the 76attribute certificate holder. OSSL_OBJECT_DIGEST_INFO_set1_digest() sets the 77digest information of the object. The type of I<digest> information is given 78by I<digestedObjectType> and can be one of: 79 80=over 4 81 82=item OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY 83 84Hash of a public key 85 86=item OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY_CERT 87 88Hash of a public key certificate 89 90=item OSSL_OBJECT_DIGEST_INFO_OTHER 91 92Hash of another object. See NOTES below. 93 94=back 95 96I<digestAlgorithm> indicates the algorithm used to compute I<digest>. 97 98=head1 RETURN VALUES 99 100All I<set0>/I<set1> routines return 1 for success and 0 for failure. 101All I<get0> functions return a pointer to the object's inner structure. These 102pointers must not be freed after use. 103 104=head1 NOTES 105 106Although the value of B<OSSL_OBJECT_DIGEST_INFO_OTHER> is defined in RFC 5755, 107its use is prohibited for conformant attribute certificates. 108 109=head1 HISTORY 110 111These functions were added in OpenSSL 3.4. 112 113=head1 COPYRIGHT 114 115Copyright 2023-2024 The OpenSSL Project Authors. All Rights Reserved. 116 117Licensed under the Apache License 2.0 (the "License"). You may not use 118this file except in compliance with the License. You can obtain a copy 119in the file LICENSE in the source distribution or at 120L<https://www.openssl.org/source/license.html>. 121 122=cut 123