diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2022-09-13 15:43:59 +0200 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2022-11-24 14:00:46 +0100 |
commit | 19ddcc4cbb43464493a4b82332a1ab96da823451 (patch) | |
tree | e32e04916cd15ef271c8c5b30b4075844e4eecdd /doc/man3 | |
parent | 33a73e33dce1e62613d67471ba8b68afe01166c0 (diff) |
CMP: fix status held in OSSL_CMP_CTX, in particular for genp messages
On this occasion, replace magic constants by mnemonic ones; update doc
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/19205)
Diffstat (limited to 'doc/man3')
-rw-r--r-- | doc/man3/OSSL_CMP_CTX_new.pod | 26 | ||||
-rw-r--r-- | doc/man3/OSSL_CMP_exec_certreq.pod | 9 |
2 files changed, 28 insertions, 7 deletions
diff --git a/doc/man3/OSSL_CMP_CTX_new.pod b/doc/man3/OSSL_CMP_CTX_new.pod index bc027cab1b..1949a60910 100644 --- a/doc/man3/OSSL_CMP_CTX_new.pod +++ b/doc/man3/OSSL_CMP_CTX_new.pod @@ -632,9 +632,29 @@ OSSL_CMP_CTX_get_certConf_cb_arg() gets the argument, respectively the pointer to a structure containing arguments, previously set by OSSL_CMP_CTX_set_certConf_cb_arg(), or NULL if unset. -OSSL_CMP_CTX_get_status() returns the PKIstatus from the last received -CertRepMessage or Revocation Response or error message, or -1 if unset. -For server contexts it returns -2 if a transaction is open, else -1. +OSSL_CMP_CTX_get_status() returns for client contexts the PKIstatus from +the last received CertRepMessage or Revocation Response or error message: +=item B<OSSL_CMP_PKISTATUS_accepted> on sucessful receipt of a GENP message: + +=over 4 + +=item B<OSSL_CMP_PKISTATUS_request> + +if an IR/CR/KUR/RR/GENM request message could not be produced, + +=item B<OSSL_CMP_PKISTATUS_trans> + +on a transmission error or transaction error for this type of request, and + +=item B<OSSL_CMP_PKISTATUS_unspecified> + +if no such request was attempted or OSSL_CMP_CTX_reinit() has been called. + +=back + +For server contexts it returns +B<OSSL_CMP_PKISTATUS_trans> if a transaction is open, +otherwise B<OSSL_CMP_PKISTATUS_unspecified>. OSSL_CMP_CTX_get0_statusString() returns the statusString from the last received CertRepMessage or Revocation Response or error message, or NULL if unset. diff --git a/doc/man3/OSSL_CMP_exec_certreq.pod b/doc/man3/OSSL_CMP_exec_certreq.pod index 60e2cf0f22..b0d81c7c41 100644 --- a/doc/man3/OSSL_CMP_exec_certreq.pod +++ b/doc/man3/OSSL_CMP_exec_certreq.pod @@ -109,8 +109,9 @@ make no sense for revocation and thus are treated as an error as well. OSSL_CMP_exec_GENM_ses() sends a general message containing the sequence of infoType and infoValue pairs (InfoTypeAndValue; short: B<ITAV>) -provided in the I<ctx> using L<OSSL_CMP_CTX_push0_genm_ITAV(3)>. -It returns the list of B<ITAV>s received in the GenRep. +optionally provided in the I<ctx> using L<OSSL_CMP_CTX_push0_genm_ITAV(3)>. +On success it records in I<ctx> the status B<OSSL_CMP_PKISTATUS_accepted> +and returns the list of B<ITAV>s received in the GENP message. This can be used, for instance, to poll for CRLs or CA Key Updates. See RFC 4210 section 5.3.19 and appendix E.5 for details. @@ -139,8 +140,8 @@ assign the received value unless I<checkAfter> is NULL. OSSL_CMP_exec_RR_ses() returns 1 on success, 0 on error. -OSSL_CMP_exec_GENM_ses() returns a -pointer to the received B<ITAV> sequence on success, NULL on error. +OSSL_CMP_exec_GENM_ses() returns NULL on error, +otherwise a pointer to the sequence of B<ITAV> received, which may be empty. This pointer must be freed by the caller. =head1 EXAMPLES |