Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)

Standard preamble:
========================================================================
..
..
.. Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. \*(C+ will
give a nicer C++. Capital omega is used to do unbreakable dashes and
therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
nothing in troff, for use with C<>.
.tr \(*W- . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.

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'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================

Title "OSSL_CMP_MSG_GET0_HEADER 3ossl"
OSSL_CMP_MSG_GET0_HEADER 3ossl "2023-09-19" "3.0.11" "OpenSSL"
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
"NAME"
OSSL_CMP_MSG_get0_header, OSSL_CMP_MSG_get_bodytype, OSSL_CMP_MSG_update_transactionID, OSSL_CMP_MSG_update_recipNonce, OSSL_CMP_CTX_setup_CRM, OSSL_CMP_MSG_read, OSSL_CMP_MSG_write, d2i_OSSL_CMP_MSG_bio, i2d_OSSL_CMP_MSG_bio \- function(s) manipulating CMP messages
"SYNOPSIS"
Header "SYNOPSIS" .Vb 1 #include <openssl/cmp.h> \& OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg); int OSSL_CMP_MSG_get_bodytype(const OSSL_CMP_MSG *msg); int OSSL_CMP_MSG_update_transactionID(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg); int OSSL_CMP_MSG_update_recipNonce(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg); OSSL_CRMF_MSG *OSSL_CMP_CTX_setup_CRM(OSSL_CMP_CTX *ctx, int for_KUR, int rid); OSSL_CMP_MSG *OSSL_CMP_MSG_read(const char *file, OSSL_LIB_CTX *libctx, const char *propq); int OSSL_CMP_MSG_write(const char *file, const OSSL_CMP_MSG *msg); OSSL_CMP_MSG *d2i_OSSL_CMP_MSG_bio(BIO *bio, OSSL_CMP_MSG **msg); int i2d_OSSL_CMP_MSG_bio(BIO *bio, const OSSL_CMP_MSG *msg); .Ve
"DESCRIPTION"
Header "DESCRIPTION" \fBOSSL_CMP_MSG_get0_header() returns the header of the given \s-1CMP\s0 message.

\fBOSSL_CMP_MSG_get_bodytype() returns the body type of the given \s-1CMP\s0 message.

\fBOSSL_CMP_MSG_update_transactionID() updates the transactionID field in the header of the given message according to the \s-1CMP_CTX.\s0 If ctx does not contain a transaction \s-1ID,\s0 a fresh one is created before. The message gets re-protected (if protecting requests is required).

\fBOSSL_CMP_MSG_update_recipNonce() updates the recipNonce field in the header of the given message according to the \s-1CMP_CTX.\s0 The message gets re-protected (if protecting requests is required).

\fBOSSL_CMP_CTX_setup_CRM() creates a \s-1CRMF\s0 certificate request message from various information provided in the \s-1CMP\s0 context argument ctx for inclusion in a \s-1CMP\s0 request message based on details contained in ctx. The rid argument defines the request identifier to use, which typically is 0.

The subject \s-1DN\s0 included in the certificate template is the first available value of these:

"any subject name in ctx set via OSSL_CMP_CTX_set1_subjectName\|(3) - if it is the NULL-DN (i.e., any empty sequence of RDNs), no subject is included," 4
Item "any subject name in ctx set via OSSL_CMP_CTX_set1_subjectName - if it is the NULL-DN (i.e., any empty sequence of RDNs), no subject is included,"

0

"the subject field of any PKCS#10 \s-1CSR\s0 set in ctx via OSSL_CMP_CTX_set1_p10CSR\|(3)," 4
Item "the subject field of any PKCS#10 CSR set in ctx via OSSL_CMP_CTX_set1_p10CSR,"
"the subject field of any reference certificate given in ctx (see OSSL_CMP_CTX_set1_oldCert\|(3)), but only if for_KUR is nonzero or the ctx does not include a Subject Alternative Name." 4
Item "the subject field of any reference certificate given in ctx (see OSSL_CMP_CTX_set1_oldCert), but only if for_KUR is nonzero or the ctx does not include a Subject Alternative Name."

The public key included is the first available value of these:

"the public key derived from any key set via OSSL_CMP_CTX_set0_newPkey\|(3)," 4
Item "the public key derived from any key set via OSSL_CMP_CTX_set0_newPkey,"

0

"the public key of any PKCS#10 \s-1CSR\s0 given in ctx," 4
Item "the public key of any PKCS#10 CSR given in ctx,"
"the public key of any reference certificate given in ctx (see OSSL_CMP_CTX_set1_oldCert\|(3))," 4
Item "the public key of any reference certificate given in ctx (see OSSL_CMP_CTX_set1_oldCert),"
"the public key derived from any client's private key set via OSSL_CMP_CTX_set1_pkey\|(3)." 4
Item "the public key derived from any client's private key set via OSSL_CMP_CTX_set1_pkey."

The set of X.509 extensions to include is computed as follows. If a PKCS#10 \s-1CSR\s0 is present in ctx, default extensions are taken from there, otherwise the empty set is taken as the initial value. If there is a reference certificate in ctx and contains Subject Alternative Names (SANs) and \s-1OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT\s0 is not set, these override any SANs from the PKCS#10 \s-1CSR.\s0 The extensions are further augmented or overridden by any extensions with the same OIDs included in the ctx via OSSL_CMP_CTX_set0_reqExtensions\|(3). The SANs are further overridden by any SANs included in ctx via \fBOSSL_CMP_CTX_push1_subjectAltName\|(3). Finally, policies are overridden by any policies included in ctx via \fBOSSL_CMP_CTX_push0_policy\|(3).

\fBOSSL_CMP_CTX_setup_CRM() also sets the sets the regToken control oldCertID for \s-1KUR\s0 messages using the issuer name and serial number of the reference certificate, if present.

\fBOSSL_CMP_MSG_read() loads a DER-encoded \s-1OSSL_CMP_MSG\s0 from file.

\fBOSSL_CMP_MSG_write() stores the given \s-1OSSL_CMP_MSG\s0 to file in \s-1DER\s0 encoding.

\fBd2i_OSSL_CMP_MSG_bio() parses an \s-1ASN\s0.1-encoded \s-1OSSL_CMP_MSG\s0 from the \s-1BIO\s0 bio. It assigns a pointer to the new structure to *msg if msg is not \s-1NULL.\s0

\fBi2d_OSSL_CMP_MSG_bio() writes the \s-1OSSL_CMP_MSG\s0 msg in \s-1ASN.1\s0 encoding to \s-1BIO\s0 bio.

"NOTES"
Header "NOTES" \s-1CMP\s0 is defined in \s-1RFC 4210.\s0
"RETURN VALUES"
Header "RETURN VALUES" \fBOSSL_CMP_MSG_get0_header() returns the intended pointer value as described above or \s-1NULL\s0 if the respective entry does not exist and on error.

\fBOSSL_CMP_MSG_get_bodytype() returns the body type or -1 on error.

\fBOSSL_CMP_CTX_setup_CRM() returns a pointer to a \s-1OSSL_CRMF_MSG\s0 on success, \s-1NULL\s0 on error.

\fBd2i_OSSL_CMP_MSG_bio() returns the parsed message or \s-1NULL\s0 on error.

\fBOSSL_CMP_MSG_read() and d2i_OSSL_CMP_MSG_bio() return the parsed \s-1CMP\s0 message or \s-1NULL\s0 on error.

\fBOSSL_CMP_MSG_write() returns the number of bytes successfully encoded or a negative value if an error occurs.

\fBi2d_OSSL_CMP_MSG_bio(), OSSL_CMP_MSG_update_transactionID(), and OSSL_CMP_MSG_update_recipNonce() return 1 on success, 0 on error.

"SEE ALSO"
Header "SEE ALSO" \fBOSSL_CMP_CTX_set1_subjectName\|(3), OSSL_CMP_CTX_set1_p10CSR\|(3), \fBOSSL_CMP_CTX_set1_oldCert\|(3), OSSL_CMP_CTX_set0_newPkey\|(3), \fBOSSL_CMP_CTX_set1_pkey\|(3), OSSL_CMP_CTX_set0_reqExtensions\|(3), \fBOSSL_CMP_CTX_push1_subjectAltName\|(3), OSSL_CMP_CTX_push0_policy\|(3)
"HISTORY"
Header "HISTORY" The OpenSSL \s-1CMP\s0 support was added in OpenSSL 3.0.

\fBOSSL_CMP_MSG_update_recipNonce() was added in OpenSSL 3.0.9.

"COPYRIGHT"
Header "COPYRIGHT" Copyright 2007-2023 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use this file except in compliance with the License. You can obtain a copy in the file \s-1LICENSE\s0 in the source distribution or at <https://www.openssl.org/source/license.html>.