summaryrefslogtreecommitdiff
path: root/static/freebsd/man3/X509_ACERT_get0_holder_baseCertId.3
blob: 00e537a8f26d3cec6b4a002c62bfe2f47d3720a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\"
.\" Required to disable full justification in groff 1.23.0.
.if n .ds AD l
.\" ========================================================================
.\"
.IX Title "X509_ACERT_GET0_HOLDER_BASECERTID 3ossl"
.TH X509_ACERT_GET0_HOLDER_BASECERTID 3ossl 2026-04-07 3.5.6 OpenSSL
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH 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
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 1
\& #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);
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
These routines set and get the holder identity of an X509 attribute certificate.
.PP
\&\fBX509_ACERT_set0_holder_entityName()\fR sets the identity as a \fBGENERAL_NAME\fR
\&\fIname\fR, \fBX509_ACERT_set0_holder_baseCertId()\fR sets the identity based on the
issuer and serial number of a certificate detailed in \fIisss\fR and
\&\fBX509_ACERT_set0_holder_digest()\fR sets the holder entity based on digest
information \fIdinfo\fR. Although RFC 5755 section 4.2.2 recommends that only
one of the above methods be used to set the holder identity for a given
attribute certificate \fIx\fR, setting multiple methods at the same time is
possible.  It is up to the application to handle cases when conflicting
identity information is specified using different methods.
.PP
Pointers to the internal structures describing the holder identity of
attribute certificate \fIx\fR can be retrieved with
\&\fBX509_ACERT_get0_holder_entityName()\fR, \fBX509_ACERT_get0_holder_baseCertId()\fR, and
\&\fBX509_ACERT_get0_holder_digest()\fR.
.PP
A \fBOSSL_ISSUER_SERIAL\fR object holds the subject name and UID of a certificate
issuer and a certificate\*(Aqs serial number.  \fBOSSL_ISSUER_SERIAL_set1_issuer()\fR,
\&\fBOSSL_ISSUER_SERIAL_set1_issuerUID()\fR, and \fBOSSL_ISSUER_SERIAL_set1_serial()\fR
respectively copy these values into the \fBOSSL_ISSUER_SERIAL\fR structure.
The application is responsible for freeing its own copy of these values after
use.  \fBOSSL_ISSUER_SERIAL_get0_issuer()\fR, \fBOSSL_ISSUER_SERIAL_get0_issuerUID()\fR,
and \fBOSSL_ISSUER_SERIAL_get0_serial()\fR return pointers to these values in the object.
.PP
An \fBOSSL_OBJECT_DIGEST_INFO\fR object holds a digest of data to identify the
attribute certificate holder.  \fBOSSL_OBJECT_DIGEST_INFO_set1_digest()\fR sets the
digest information of the object.  The type of \fIdigest\fR information is given
by \fIdigestedObjectType\fR and can be one of:
.IP OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY 4
.IX Item "OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY"
Hash of a public key
.IP OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY_CERT 4
.IX Item "OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY_CERT"
Hash of a public key certificate
.IP OSSL_OBJECT_DIGEST_INFO_OTHER 4
.IX Item "OSSL_OBJECT_DIGEST_INFO_OTHER"
Hash of another object. See NOTES below.
.PP
\&\fIdigestAlgorithm\fR indicates the algorithm used to compute \fIdigest\fR.
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
All \fIset0\fR/\fIset1\fR routines return 1 for success and 0 for failure.
All \fIget0\fR functions return a pointer to the object\*(Aqs inner structure. These
pointers must not be freed after use.
.SH NOTES
.IX Header "NOTES"
Although the value of \fBOSSL_OBJECT_DIGEST_INFO_OTHER\fR is defined in RFC 5755,
its use is prohibited for conformant attribute certificates.
.SH HISTORY
.IX Header "HISTORY"
These functions were added in OpenSSL 3.4.
.SH COPYRIGHT
.IX Header "COPYRIGHT"
Copyright 2023\-2024 The OpenSSL Project Authors. All Rights Reserved.
.PP
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>.