]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/internal/man3/ossl_cmp_msg_create.pod
Chunk 9 of CMP contribution to OpenSSL: CMP client and related tests
[thirdparty/openssl.git] / doc / internal / man3 / ossl_cmp_msg_create.pod
CommitLineData
fcc25beb
DDO
1=pod
2
3=head1 NAME
4
5ossl_cmp_bodytype_to_string,
6ossl_cmp_msg_get_bodytype,
7ossl_cmp_msg_set_bodytype,
8ossl_cmp_msg_create,
9ossl_cmp_msg_load,
10ossl_cmp_msg_gen_ITAV_push0,
11ossl_cmp_msg_gen_ITAVs_push1
12- functions manipulating CMP messages
13
14=head1 SYNOPSIS
15
16 #include "cmp_int.h"
17
18 const char *ossl_cmp_bodytype_to_string(int type);
19 int ossl_cmp_msg_get_bodytype(const OSSL_CMP_MSG *msg);
20 int ossl_cmp_msg_set_bodytype( OSSL_CMP_MSG *msg, int type);
21 OSSL_CMP_MSG *ossl_cmp_msg_create(OSSL_CMP_CTX *ctx, int bodytype);
22 OSSL_CMP_MSG *ossl_cmp_msg_load(const char *file);
23 int ossl_cmp_msg_gen_ITAV_push0(OSSL_CMP_MSG *msg, OSSL_CMP_ITAV *itav);
24 int ossl_cmp_msg_gen_ITAVs_push1(OSSL_CMP_MSG *msg,
25 STACK_OF(OSSL_CMP_ITAV) *itavs);
26
27=head1 DESCRIPTION
28
29ossl_cmp_bodytype_to_string() returns the name of the given body type as string,
30or "illegal body type" on error.
31
32ossl_cmp_msg_get_bodytype() returns the body type of the given PKIMessage,
33or -1 on error.
34
35ossl_cmp_msg_set_bodytype() sets the type of the message contained in
36the PKIMessage body field.
37Returns 1 on success, 0 on error.
38
39ossl_cmp_msg_create() creates and initializes a OSSL_CMP_MSG structure,
40using B<ctx> for the header and B<bodytype> for the body.
41Returns pointer to created OSSL_CMP_MSG on success, NULL on error.
42
43OSSL_CMP_MSG *ossl_cmp_msg_load() loads a OSSL_CMP_MSG from a B<file>.
44Returns pointer to created OSSL_CMP_MSG on success, NULL on error.
45
46ossl_cmp_msg_gen_ITAV_push0() pushes the B<itav> to the body of the
47PKIMessage B<msg> of GenMsg or GenRep type. Consumes the B<itavs> pointer.
48Returns 1 on success, 0 on error.
49
50ossl_cmp_msg_gen_ITAVs_push1() adds a copy of the B<itavs> stack to the body
51of the PKIMessage B<msg> of GenMsg or GenRep type.
52Does not consume the B<itavs> pointer nor its elements.
53Returns 1 on success, 0 on error.
54
55=head1 NOTES
56
57CMP is defined in RFC 4210 (and CRMF in RFC 4211).
58
59=head1 RETURN VALUES
60
61See the individual functions above.
62
63=head1 SEE ALSO
64
7e765f46 65L<OSSL_CMP_CTX_new(3)>, L<OSSL_CMP_exec_IR_ses(3)>
fcc25beb
DDO
66
67=head1 HISTORY
68
69The OpenSSL CMP support was added in OpenSSL 3.0.
70
71=head1 COPYRIGHT
72
73Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
74
75Licensed under the Apache License 2.0 (the "License"). You may not use
76this file except in compliance with the License. You can obtain a copy
77in the file LICENSE in the source distribution or at
78L<https://www.openssl.org/source/license.html>.
79
80=cut