1e1051a39Sopenharmony_ci=pod 2e1051a39Sopenharmony_ci 3e1051a39Sopenharmony_ci=head1 NAME 4e1051a39Sopenharmony_ci 5e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_IR, 6e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_IP, 7e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_CR, 8e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_CP, 9e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_P10CR, 10e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_POPDECC, 11e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_POPDECR, 12e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_KUR, 13e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_KUP, 14e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_KRR, 15e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_KRP, 16e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_RR, 17e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_RP, 18e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_CCR, 19e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_CCP, 20e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_CKUANN, 21e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_CANN, 22e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_RANN, 23e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_CRLANN, 24e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_PKICONF, 25e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_NESTED, 26e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_GENM, 27e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_GENP, 28e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_ERROR, 29e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_CERTCONF, 30e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_POLLREQ, 31e1051a39Sopenharmony_ciOSSL_CMP_PKIBODY_POLLREP, 32e1051a39Sopenharmony_ciossl_cmp_bodytype_to_string, 33e1051a39Sopenharmony_ciossl_cmp_msg_get_bodytype, 34e1051a39Sopenharmony_ciossl_cmp_msg_set_bodytype, 35e1051a39Sopenharmony_ciossl_cmp_msg_create, 36e1051a39Sopenharmony_ciossl_cmp_msg_gen_ITAV_push0, 37e1051a39Sopenharmony_ciossl_cmp_msg_gen_ITAVs_push1 38e1051a39Sopenharmony_ci- functions handling CMP messages 39e1051a39Sopenharmony_ci 40e1051a39Sopenharmony_ci=head1 SYNOPSIS 41e1051a39Sopenharmony_ci 42e1051a39Sopenharmony_ci #include "cmp_local.h" 43e1051a39Sopenharmony_ci 44e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_IR 0 45e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_IP 1 46e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_CR 2 47e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_CP 3 48e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_P10CR 4 49e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_POPDECC 5 50e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_POPDECR 6 51e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_KUR 7 52e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_KUP 8 53e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_KRR 9 54e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_KRP 10 55e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_RR 11 56e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_RP 12 57e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_CCR 13 58e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_CCP 14 59e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_CKUANN 15 60e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_CANN 16 61e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_RANN 17 62e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_CRLANN 18 63e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_PKICONF 19 64e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_NESTED 20 65e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_GENM 21 66e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_GENP 22 67e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_ERROR 23 68e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_CERTCONF 24 69e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_POLLREQ 25 70e1051a39Sopenharmony_ci #define OSSL_CMP_PKIBODY_POLLREP 26 71e1051a39Sopenharmony_ci 72e1051a39Sopenharmony_ci const char *ossl_cmp_bodytype_to_string(int type); 73e1051a39Sopenharmony_ci int ossl_cmp_msg_get_bodytype(const OSSL_CMP_MSG *msg); 74e1051a39Sopenharmony_ci int ossl_cmp_msg_set_bodytype( OSSL_CMP_MSG *msg, int type); 75e1051a39Sopenharmony_ci OSSL_CMP_MSG *ossl_cmp_msg_create(OSSL_CMP_CTX *ctx, int bodytype); 76e1051a39Sopenharmony_ci int ossl_cmp_msg_gen_ITAV_push0(OSSL_CMP_MSG *msg, OSSL_CMP_ITAV *itav); 77e1051a39Sopenharmony_ci int ossl_cmp_msg_gen_ITAVs_push1(OSSL_CMP_MSG *msg, 78e1051a39Sopenharmony_ci STACK_OF(OSSL_CMP_ITAV) *itavs); 79e1051a39Sopenharmony_ci 80e1051a39Sopenharmony_ci=head1 DESCRIPTION 81e1051a39Sopenharmony_ci 82e1051a39Sopenharmony_ciossl_cmp_bodytype_to_string() returns the name of the given body type as string, 83e1051a39Sopenharmony_cior "illegal body type" on error. 84e1051a39Sopenharmony_ci 85e1051a39Sopenharmony_ciossl_cmp_msg_get_bodytype() returns the body type of the given PKIMessage, 86e1051a39Sopenharmony_cior -1 on error. 87e1051a39Sopenharmony_ci 88e1051a39Sopenharmony_ciossl_cmp_msg_set_bodytype() sets the type of the message contained in 89e1051a39Sopenharmony_cithe PKIMessage body field. 90e1051a39Sopenharmony_ciReturns 1 on success, 0 on error. 91e1051a39Sopenharmony_ci 92e1051a39Sopenharmony_ciossl_cmp_msg_create() creates and initializes an B<OSSL_CMP_MSG> structure, 93e1051a39Sopenharmony_ciusing fields of B<ctx> for the header and B<bodytype> for the body. 94e1051a39Sopenharmony_ciIf the current B<transactionID> field in I<ctx> indicates that there is no 95e1051a39Sopenharmony_cicurrent transaction, it creates and stores a random one with 128 bits length. 96e1051a39Sopenharmony_ciThus, the I<ctx> may be modified by this and related ossl_cmp_*_new() functions. 97e1051a39Sopenharmony_ciReturns pointer to created B<OSSL_CMP_MSG> on success, NULL on error. 98e1051a39Sopenharmony_ci 99e1051a39Sopenharmony_ciossl_cmp_msg_gen_ITAV_push0() pushes the B<itav> to the body of the 100e1051a39Sopenharmony_ciPKIMessage B<msg> of GenMsg or GenRep type. Consumes the B<itavs> pointer. 101e1051a39Sopenharmony_ciReturns 1 on success, 0 on error. 102e1051a39Sopenharmony_ci 103e1051a39Sopenharmony_ciossl_cmp_msg_gen_ITAVs_push1() adds a copy of the B<itavs> stack to the body 104e1051a39Sopenharmony_ciof the PKIMessage B<msg> of GenMsg or GenRep type. 105e1051a39Sopenharmony_ciDoes not consume the B<itavs> pointer nor its elements. 106e1051a39Sopenharmony_ciReturns 1 on success, 0 on error. 107e1051a39Sopenharmony_ci 108e1051a39Sopenharmony_ci=head1 NOTES 109e1051a39Sopenharmony_ci 110e1051a39Sopenharmony_ciCMP is defined in RFC 4210 (and CRMF in RFC 4211). 111e1051a39Sopenharmony_ci 112e1051a39Sopenharmony_ci=head1 RETURN VALUES 113e1051a39Sopenharmony_ci 114e1051a39Sopenharmony_ciSee the individual functions above. 115e1051a39Sopenharmony_ci 116e1051a39Sopenharmony_ci=head1 SEE ALSO 117e1051a39Sopenharmony_ci 118e1051a39Sopenharmony_ciL<ossl_cmp_hdr_init(3)>, 119e1051a39Sopenharmony_ciL<OSSL_CMP_CTX_new(3)>, L<OSSL_CMP_exec_certreq(3)> 120e1051a39Sopenharmony_ci 121e1051a39Sopenharmony_ci=head1 HISTORY 122e1051a39Sopenharmony_ci 123e1051a39Sopenharmony_ciThe OpenSSL CMP support was added in OpenSSL 3.0. 124e1051a39Sopenharmony_ci 125e1051a39Sopenharmony_ci=head1 COPYRIGHT 126e1051a39Sopenharmony_ci 127e1051a39Sopenharmony_ciCopyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved. 128e1051a39Sopenharmony_ci 129e1051a39Sopenharmony_ciLicensed under the Apache License 2.0 (the "License"). You may not use 130e1051a39Sopenharmony_cithis file except in compliance with the License. You can obtain a copy 131e1051a39Sopenharmony_ciin the file LICENSE in the source distribution or at 132e1051a39Sopenharmony_ciL<https://www.openssl.org/source/license.html>. 133e1051a39Sopenharmony_ci 134e1051a39Sopenharmony_ci=cut 135