Skip to content

Commit 880a4e3

Browse files
chore(docs): new acert options and verification functoin
1 parent 2b1e39d commit 880a4e3

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed

doc/build.info

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2879,6 +2879,10 @@ DEPEND[html/man3/X509_add_cert.html]=man3/X509_add_cert.pod
28792879
GENERATE[html/man3/X509_add_cert.html]=man3/X509_add_cert.pod
28802880
DEPEND[man/man3/X509_add_cert.3]=man3/X509_add_cert.pod
28812881
GENERATE[man/man3/X509_add_cert.3]=man3/X509_add_cert.pod
2882+
DEPEND[html/man3/X509_attr_cert_verify.html]=man3/X509_attr_cert_verify.pod
2883+
GENERATE[html/man3/X509_attr_cert_verify.html]=man3/X509_attr_cert_verify.pod
2884+
DEPEND[man/man3/X509_attr_cert_verify.3]=man3/X509_attr_cert_verify.pod
2885+
GENERATE[man/man3/X509_attr_cert_verify.3]=man3/X509_attr_cert_verify.pod
28822886
DEPEND[html/man3/X509_check_ca.html]=man3/X509_check_ca.pod
28832887
GENERATE[html/man3/X509_check_ca.html]=man3/X509_check_ca.pod
28842888
DEPEND[man/man3/X509_check_ca.3]=man3/X509_check_ca.pod
@@ -3625,6 +3629,7 @@ html/man3/X509_STORE_new.html \
36253629
html/man3/X509_STORE_set_verify_cb_func.html \
36263630
html/man3/X509_VERIFY_PARAM_set_flags.html \
36273631
html/man3/X509_add_cert.html \
3632+
html/man3/X509_attr_cert_verify.html \
36283633
html/man3/X509_check_ca.html \
36293634
html/man3/X509_check_host.html \
36303635
html/man3/X509_check_issued.html \
@@ -4262,6 +4267,7 @@ man/man3/X509_STORE_new.3 \
42624267
man/man3/X509_STORE_set_verify_cb_func.3 \
42634268
man/man3/X509_VERIFY_PARAM_set_flags.3 \
42644269
man/man3/X509_add_cert.3 \
4270+
man/man3/X509_attr_cert_verify.3 \
42654271
man/man3/X509_check_ca.3 \
42664272
man/man3/X509_check_host.3 \
42674273
man/man3/X509_check_issued.3 \

doc/man1/openssl-acert.pod.in

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ B<openssl> B<acert>
2525
[B<-holder> I<filename>]
2626
[B<-use-holder-basecertid>]
2727
[B<-use-holder-name>]
28+
[B<-target-cert>]
29+
[B<-asserted-before>]
2830
[B<-AA> I<filename>|I<uri>]
2931
[B<-AAkey> I<filename>|I<uri>]
3032
[B<-keyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>]
@@ -121,6 +123,24 @@ holder in the new attribute certificate.
121123
Use the holder certificate's subject name to identify the holder
122124
in the new attribute certificate.
123125

126+
=item B<-target-cert> I<filename>
127+
128+
The target certificate file, from which a TARGET (using the targetCert
129+
alternative) is constructed and compared against the targets listed in the
130+
targetingInformation X.509v3 extension, if it is present. This argument takes
131+
effect if the B<acert> command is used with the B<-verify> option.
132+
133+
Verification will not fail if the targetingInformation extension does not
134+
exist in the verified attribute certificate, but it will fail if the extension
135+
is present and the target does not appear in the list of targets.
136+
137+
=item B<-asserted-before>
138+
139+
Specifies whether the verified attribute certificate has been asserted once
140+
before. If provided, this causes verification of an attribute certificate to
141+
fail if the singleUse X.509v3 extension is present. This argument only takes
142+
effect if the B<acert> command is used with the B<-verify> option.
143+
124144
=item B<-AA> I<filename>|I<uri>
125145

126146
Specifies the Attribute Authority certificate to be used for signing with the

doc/man3/X509_attr_cert_verify.pod

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
=pod
2+
3+
=head1 NAME
4+
5+
X509_attr_cert_verify, X509_attr_cert_verify_ex, acert_crl
6+
- attribute certificate verification functions
7+
8+
=head1 SYNOPSIS
9+
10+
int X509_attr_cert_verify(X509_ACERT *acert, X509 *issuer);
11+
int X509_attr_cert_verify_ex(X509_ACERT *acert, X509 *issuer, X509 *holder,
12+
TARGET *tgt, int asserted_before);
13+
int acert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509_ACERT *x);
14+
15+
=head1 DESCRIPTION
16+
17+
X509_attr_cert_verify verifies that the attribute ceritifcate B<acert> is signed
18+
by the issuer B<issuer> and that the attribute certificate is valid with
19+
respect to its validity times and its extensions. This function does B<not>
20+
verify the B<issuer> certificate.
21+
22+
X509_attr_cert_verify_ex is the extended form of X509_attr_cert_verify, which
23+
takes an optional B<holder> argument, B<tgt> argument, and B<asserted_before>
24+
argument.
25+
26+
If not B<NULL>, the subject and subject alternative names are extracted from
27+
the B<holder> public key certificate and compared against the holder field of
28+
the asserted attribute certificate, B<acert>.
29+
30+
If not B<NULL>, the target is checked against the list of permitted targets
31+
within the targetingInformation X.509v3 extension, if the extension is present.
32+
33+
If set to a truthy value, B<asserted_before> causes attribute certificate
34+
verification to fail if the singleUse X.509v3 extension is present.
35+
36+
acert_crl returns 1 if the attribute certificate B<x> is not revoked in the
37+
certificate revocation list B<crl>, some other integer otherwise.
38+
39+
=head1 NOTES
40+
41+
These functions verify an X.509 attribute certificate to varying degrees. None
42+
of them verify the corresponding public key certificate, but the public key
43+
certificates can just be verified using the normal OpenSSL verification
44+
functions.
45+
46+
=head1 RETURN VALUES
47+
48+
Both X509_attr_cert_verify and X509_attr_cert_verify_ex return X509_V_OK (0) if
49+
the attribute certificate is valid with respect to the supplied verification
50+
parameters, or some other X509_V_ERR_ value otherwise. As stated above,
51+
acert_crl returns 1 if the attribute certificate is not revoked in the provided
52+
certificate revocation list, and some other integer otherwise.
53+
54+
=head1 COPYRIGHT
55+
56+
Copyright 2023 The OpenSSL Project Authors. All Rights Reserved.
57+
58+
Licensed under the Apache License 2.0 (the "License"). You may not use
59+
this file except in compliance with the License. You can obtain a copy
60+
in the file LICENSE in the source distribution or at
61+
L<https://www.openssl.org/source/license.html>.
62+
63+
=cut

0 commit comments

Comments
 (0)