Certificate Management Protocol (CMP, RFC 4210) extension to OpenSSL
[openssl.git] / doc / man3 / OSSL_CRMF_MSG_set1_regCtrl_regToken.pod
1 =pod
2
3 =head1 NAME
4
5 OSSL_CRMF_MSG_set1_regCtrl_regToken,
6 OSSL_CRMF_MSG_set1_regCtrl_authenticator,
7 OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo,
8 OSSL_CRMF_MSG_set0_SinglePubInfo,
9 OSSL_CRMF_MSG_set_PKIPublicationInfo_action,
10 OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo,
11 OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey,
12 OSSL_CRMF_MSG_set1_regCtrl_oldCertID,
13 OSSL_CRMF_CERTID_gen
14 - functions setting CRMF Registration Controls
15
16 =head1 SYNOPSIS
17
18  #include <openssl/crmf.h>
19
20  int OSSL_CRMF_MSG_set1_regCtrl_regToken(OSSL_CRMF_MSG *msg,
21                                          const ASN1_UTF8STRING *tok);
22  int OSSL_CRMF_MSG_set1_regCtrl_authenticator(OSSL_CRMF_MSG *msg,
23                                               const ASN1_UTF8STRING *auth);
24  int OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo(
25                                   OSSL_CRMF_PKIPUBLICATIONINFO *pi,
26                                   OSSL_CRMF_SINGLEPUBINFO *spi);
27  int OSSL_CRMF_MSG_set0_SinglePubInfo(OSSL_CRMF_SINGLEPUBINFO *spi,
28                                       int method, GENERAL_NAME *nm);
29  int OSSL_CRMF_MSG_set_PKIPublicationInfo_action(
30                                   OSSL_CRMF_PKIPUBLICATIONINFO *pi, int action);
31  int OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo(OSSL_CRMF_MSG *msg,
32                                         const OSSL_CRMF_PKIPUBLICATIONINFO *pi);
33  int OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey(OSSL_CRMF_MSG *msg,
34                                                 const X509_PUBKEY *pubkey);
35  int OSSL_CRMF_MSG_set1_regCtrl_oldCertID(OSSL_CRMF_MSG *msg,
36                                           const OSSL_CRMF_CERTID *cid);
37  OSSL_CRMF_CERTID *OSSL_CRMF_CERTID_gen(const X509_NAME *issuer,
38                                         const ASN1_INTEGER *serial);
39
40 =head1 DESCRIPTION
41
42 OSSL_CRMF_MSG_set1_regCtrl_regToken() sets the regToken control in the given
43 B<msg> copying the given B<tok> as value. See RFC 4211, section 6.1.
44
45 OSSL_CRMF_MSG_set1_regCtrl_authenticator() sets the authenticator control in
46 the given B<msg> copying the given B<auth> as value. See RFC 4211, section 6.2.
47
48 OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo() pushes the given B<spi>
49 to B<si>. Consumes the B<spi> pointer.
50
51 OSSL_CRMF_MSG_set0_SinglePubInfo() sets given B<method> and PubLoction B<nm> to
52 B<spi>.  PubLocation is optional, and therefore B<nm> may be NULL. Consumes the
53 B<nm> pointer.
54 Available methods are:
55  # define OSSL_CRMF_PUB_METHOD_DONTCARE 0
56  # define OSSL_CRMF_PUB_METHOD_X500     1
57  # define OSSL_CRMF_PUB_METHOD_WEB      2
58  # define OSSL_CRMF_PUB_METHOD_LDAP     3
59
60 OSSL_CRMF_MSG_set_PKIPublicationInfo_action() sets the action in the given B<pi>
61 using the given B<action> as value. See RFC 4211, section 6.3.
62 Available actions are:
63  # define OSSL_CRMF_PUB_ACTION_DONTPUBLISH   0
64  # define OSSL_CRMF_PUB_ACTION_PLEASEPUBLISH 1
65
66 OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo() sets the pkiPulicationInfo
67 control in the given B<msg> copying the given B<tok> as value. See RFC 4211,
68 section 6.3.
69
70 OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey() sets the protocolEncrKey control in
71 the given B<msg> copying the given B<pubkey> as value. See RFC 4211, section 6.6.
72
73 OSSL_CRMF_MSG_set1_regCtrl_oldCertID() sets the oldCertID control in the given
74 B<msg> copying the given B<cid> as value. See RFC 4211, section 6.5.
75
76 OSSL_CRMF_CERTID_gen produces an OSSL_CRMF_CERTID_gen structure copying the
77 given B<issuer> name and B<serial> number.
78
79 =head1 RETURN VALUES
80
81 OSSL_CRMF_CERTID_gen returns a pointer to the resulting structure
82 or NULL on error.
83
84 All other functions return 1 on success, 0 on error.
85
86 =head1 NOTES
87
88 A function OSSL_CRMF_MSG_set1_regCtrl_pkiArchiveOptions() for setting an
89 Archive Options Control is not yet implemented due to missing features to
90 create the needed OSSL_CRMF_PKIARCHIVEOPTINS content.
91
92 =head1 SEE ALSO
93
94 RFC 4211
95
96 =head1 COPYRIGHT
97
98 Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved.
99
100 Licensed under the OpenSSL license (the "License").  You may not use
101 this file except in compliance with the License.  You can obtain a copy
102 in the file LICENSE in the source distribution or at
103 L<https://www.openssl.org/source/license.html>.
104
105 =cut