Debian Codegraph @

upstream/debian-unstable/man3/OSSL_CRMF_MSG_set0_validity.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "OSSL_CRMF_MSG_SET0_VALIDITY 3SSL"
58 .TH OSSL_CRMF_MSG_SET0_VALIDITY 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 OSSL_CRMF_MSG_set0_validity,
65 OSSL_CRMF_MSG_set_certReqId,
66 OSSL_CRMF_CERTTEMPLATE_fill,
67 OSSL_CRMF_MSG_set0_extensions,
68 OSSL_CRMF_MSG_push0_extension,
69 OSSL_CRMF_MSG_create_popo,
70 OSSL_CRMF_MSGS_verify_popo
71 \&\- functions populating and verifying CRMF CertReqMsg structures
72 .SH SYNOPSIS
73 .IX Header "SYNOPSIS"
74 .Vb 1
75 \& #include <openssl/crmf.h>
76 \&
77 \& int OSSL_CRMF_MSG_set0_validity(OSSL_CRMF_MSG *crm,
78 \& ASN1_TIME *notBefore, ASN1_TIME *notAfter);
79 \&
80 \& int OSSL_CRMF_MSG_set_certReqId(OSSL_CRMF_MSG *crm, int rid);
81 \&
82 \& int OSSL_CRMF_CERTTEMPLATE_fill(OSSL_CRMF_CERTTEMPLATE *tmpl,
83 \& EVP_PKEY *pubkey,
84 \& const X509_NAME *subject,
85 \& const X509_NAME *issuer,
86 \& const ASN1_INTEGER *serial);
87 \&
88 \& int OSSL_CRMF_MSG_set0_extensions(OSSL_CRMF_MSG *crm, X509_EXTENSIONS *exts);
89 \&
90 \& int OSSL_CRMF_MSG_push0_extension(OSSL_CRMF_MSG *crm, X509_EXTENSION *ext);
91 \&
92 \& int OSSL_CRMF_MSG_create_popo(int meth, OSSL_CRMF_MSG *crm,
93 \& EVP_PKEY *pkey, const EVP_MD *digest,
94 \& OSSL_LIB_CTX *libctx, const char *propq);
95 \&
96 \& int OSSL_CRMF_MSGS_verify_popo(const OSSL_CRMF_MSGS *reqs,
97 \& int rid, int acceptRAVerified,
98 \& OSSL_LIB_CTX *libctx, const char *propq);
99 .Ve
100 .SH DESCRIPTION
101 .IX Header "DESCRIPTION"
102 \&\fBOSSL_CRMF_MSG_set0_validity()\fR sets the \fInotBefore\fR and \fInotAfter\fR fields
103 as validity constraints in the certTemplate of \fIcrm\fR.
104 Any of the \fInotBefore\fR and \fInotAfter\fR parameters may be NULL,
105 which means no constraint for the respective field.
106 On success ownership of \fInotBefore\fR and \fInotAfter\fR is transferred to \fIcrm\fR.
107 .PP
108 \&\fBOSSL_CRMF_MSG_set_certReqId()\fR sets \fIrid\fR as the certReqId of \fIcrm\fR.
109 .PP
110 \&\fBOSSL_CRMF_CERTTEMPLATE_fill()\fR sets those fields of the certTemplate \fItmpl\fR
111 for which non-NULL values are provided: \fIpubkey\fR, \fIsubject\fR, \fIissuer\fR,
112 and/or \fIserial\fR.
113 X.509 extensions may be set using \fBOSSL_CRMF_MSG_set0_extensions()\fR.
114 On success the reference counter of the \fIpubkey\fR (if given) is incremented,
115 while the \fIsubject\fR, \fIissuer\fR, and \fIserial\fR structures (if given) are copied.
116 .PP
117 \&\fBOSSL_CRMF_MSG_set0_extensions()\fR sets \fIexts\fR as the extensions in the
118 certTemplate of \fIcrm\fR. Frees any pre-existing ones and consumes \fIexts\fR.
119 .PP
120 \&\fBOSSL_CRMF_MSG_push0_extension()\fR pushes the X509 extension \fIext\fR to the
121 extensions in the certTemplate of \fIcrm\fR. Consumes \fIext\fR.
122 .PP
123 \&\fBOSSL_CRMF_MSG_create_popo()\fR creates and sets the Proof-of-Possession (POPO)
124 according to the method \fImeth\fR in \fIcrm\fR.
125 The library context \fIlibctx\fR and property query string \fIpropq\fR,
126 may be NULL to select the defaults.
127 In case the method is OSSL_CRMF_POPO_SIGNATURE the POPO is calculated
128 using the private key \fIpkey\fR and the digest method \fIdigest\fR,
129 where the \fIdigest\fR argument is ignored if \fIpkey\fR is of a type (such as
130 Ed25519 and Ed448) that is implicitly associated with a digest algorithm.
131 .PP
132 \&\fImeth\fR can be one of the following:
133 .IP \(bu 8
134 OSSL_CRMF_POPO_NONE \- RFC 4211, section 4, POP field omitted.
135 CA/RA uses out-of-band method to verify POP. Note that servers may fail in this
136 case, resulting for instance in HTTP error code 500 (Internal error).
137 .IP \(bu 8
138 OSSL_CRMF_POPO_RAVERIFIED \- RFC 4211, section 4, explicit indication
139 that the RA has already verified the POP.
140 .IP \(bu 8
141 OSSL_CRMF_POPO_SIGNATURE \- RFC 4211, section 4.1, only case 3 supported
142 so far.
143 .IP \(bu 8
144 OSSL_CRMF_POPO_KEYENC \- RFC 4211, section 4.2, only indirect method
145 (subsequentMessage/enccert) supported,
146 challenge-response exchange (challengeResp) not yet supported.
147 .IP \(bu 8
148 OSSL_CRMF_POPO_KEYAGREE \- RFC 4211, section 4.3, not yet supported.
149 .PP
150 OSSL_CRMF_MSGS_verify_popo verifies the Proof-of-Possession of the request with
151 the given \fIrid\fR in the list of \fIreqs\fR. Optionally accepts RAVerified. It can
152 make use of the library context \fIlibctx\fR and property query string \fIpropq\fR.
153 .SH "RETURN VALUES"
154 .IX Header "RETURN VALUES"
155 All functions return 1 on success, 0 on error.
156 .SH "SEE ALSO"
157 .IX Header "SEE ALSO"
158 RFC 4211
159 .SH HISTORY
160 .IX Header "HISTORY"
161 The OpenSSL CRMF support was added in OpenSSL 3.0.
162 .SH COPYRIGHT
163 .IX Header "COPYRIGHT"
164 Copyright 2007\-2023 The OpenSSL Project Authors. All Rights Reserved.
165 .PP
166 Licensed under the Apache License 2.0 (the "License"). You may not use
167 this file except in compliance with the License. You can obtain a copy
168 in the file LICENSE in the source distribution or at
169 <https://www.openssl.org/source/license.html>.