]>
Commit | Line | Data |
---|---|---|
2a3b52ea DO |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
7df56ada | 5 | OSSL_CRMF_MSG_get0_regCtrl_regToken, |
2a3b52ea | 6 | OSSL_CRMF_MSG_set1_regCtrl_regToken, |
7df56ada | 7 | OSSL_CRMF_MSG_get0_regCtrl_authenticator, |
2a3b52ea DO |
8 | OSSL_CRMF_MSG_set1_regCtrl_authenticator, |
9 | OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo, | |
10 | OSSL_CRMF_MSG_set0_SinglePubInfo, | |
11 | OSSL_CRMF_MSG_set_PKIPublicationInfo_action, | |
7df56ada | 12 | OSSL_CRMF_MSG_get0_regCtrl_pkiPublicationInfo, |
2a3b52ea | 13 | OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo, |
7df56ada | 14 | OSSL_CRMF_MSG_get0_regCtrl_protocolEncrKey, |
2a3b52ea | 15 | OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey, |
7df56ada | 16 | OSSL_CRMF_MSG_get0_regCtrl_oldCertID, |
2a3b52ea DO |
17 | OSSL_CRMF_MSG_set1_regCtrl_oldCertID, |
18 | OSSL_CRMF_CERTID_gen | |
7df56ada | 19 | - functions getting or setting CRMF Registration Controls |
2a3b52ea DO |
20 | |
21 | =head1 SYNOPSIS | |
22 | ||
23 | #include <openssl/crmf.h> | |
24 | ||
7df56ada DDO |
25 | ASN1_UTF8STRING |
26 | *OSSL_CRMF_MSG_get0_regCtrl_regToken(const OSSL_CRMF_MSG *msg); | |
2a3b52ea DO |
27 | int OSSL_CRMF_MSG_set1_regCtrl_regToken(OSSL_CRMF_MSG *msg, |
28 | const ASN1_UTF8STRING *tok); | |
7df56ada DDO |
29 | ASN1_UTF8STRING |
30 | *OSSL_CRMF_MSG_get0_regCtrl_authenticator(const OSSL_CRMF_MSG *msg); | |
2a3b52ea DO |
31 | int OSSL_CRMF_MSG_set1_regCtrl_authenticator(OSSL_CRMF_MSG *msg, |
32 | const ASN1_UTF8STRING *auth); | |
33 | int OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo( | |
34 | OSSL_CRMF_PKIPUBLICATIONINFO *pi, | |
35 | OSSL_CRMF_SINGLEPUBINFO *spi); | |
36 | int OSSL_CRMF_MSG_set0_SinglePubInfo(OSSL_CRMF_SINGLEPUBINFO *spi, | |
37 | int method, GENERAL_NAME *nm); | |
38 | int OSSL_CRMF_MSG_set_PKIPublicationInfo_action( | |
39 | OSSL_CRMF_PKIPUBLICATIONINFO *pi, int action); | |
7df56ada DDO |
40 | OSSL_CRMF_PKIPUBLICATIONINFO |
41 | *OSSL_CRMF_MSG_get0_regCtrl_pkiPublicationInfo(const OSSL_CRMF_MSG *msg); | |
2a3b52ea DO |
42 | int OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo(OSSL_CRMF_MSG *msg, |
43 | const OSSL_CRMF_PKIPUBLICATIONINFO *pi); | |
7df56ada DDO |
44 | X509_PUBKEY |
45 | *OSSL_CRMF_MSG_get0_regCtrl_protocolEncrKey(const OSSL_CRMF_MSG *msg); | |
2a3b52ea DO |
46 | int OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey(OSSL_CRMF_MSG *msg, |
47 | const X509_PUBKEY *pubkey); | |
7df56ada DDO |
48 | OSSL_CRMF_CERTID |
49 | *OSSL_CRMF_MSG_get0_regCtrl_oldCertID(const OSSL_CRMF_MSG *msg); | |
2a3b52ea DO |
50 | int OSSL_CRMF_MSG_set1_regCtrl_oldCertID(OSSL_CRMF_MSG *msg, |
51 | const OSSL_CRMF_CERTID *cid); | |
52 | OSSL_CRMF_CERTID *OSSL_CRMF_CERTID_gen(const X509_NAME *issuer, | |
53 | const ASN1_INTEGER *serial); | |
54 | ||
55 | =head1 DESCRIPTION | |
56 | ||
7df56ada DDO |
57 | Each of the OSSL_CRMF_MSG_get0_regCtrl_X() functions |
58 | returns the respective control X in the given I<msg>, if present. | |
59 | ||
2a3b52ea | 60 | OSSL_CRMF_MSG_set1_regCtrl_regToken() sets the regToken control in the given |
6d1f50b5 | 61 | I<msg> copying the given I<tok> as value. See RFC 4211, section 6.1. |
2a3b52ea DO |
62 | |
63 | OSSL_CRMF_MSG_set1_regCtrl_authenticator() sets the authenticator control in | |
6d1f50b5 | 64 | the given I<msg> copying the given I<auth> as value. See RFC 4211, section 6.2. |
2a3b52ea | 65 | |
6d1f50b5 DDO |
66 | OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo() pushes the given I<spi> |
67 | to I<si>. Consumes the I<spi> pointer. | |
2a3b52ea | 68 | |
6d1f50b5 DDO |
69 | OSSL_CRMF_MSG_set0_SinglePubInfo() sets in the given SinglePubInfo I<spi> |
70 | the I<method> and publication location, in the form of a GeneralName, I<nm>. | |
71 | The publication location is optional, and therefore I<nm> may be NULL. | |
72 | The function consumes the I<nm> pointer if present. | |
2a3b52ea DO |
73 | Available methods are: |
74 | # define OSSL_CRMF_PUB_METHOD_DONTCARE 0 | |
75 | # define OSSL_CRMF_PUB_METHOD_X500 1 | |
76 | # define OSSL_CRMF_PUB_METHOD_WEB 2 | |
77 | # define OSSL_CRMF_PUB_METHOD_LDAP 3 | |
78 | ||
6d1f50b5 DDO |
79 | OSSL_CRMF_MSG_set_PKIPublicationInfo_action() sets the action in the given I<pi> |
80 | using the given I<action> as value. See RFC 4211, section 6.3. | |
2a3b52ea DO |
81 | Available actions are: |
82 | # define OSSL_CRMF_PUB_ACTION_DONTPUBLISH 0 | |
83 | # define OSSL_CRMF_PUB_ACTION_PLEASEPUBLISH 1 | |
84 | ||
a61b7f2f | 85 | OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo() sets the pkiPublicationInfo |
6d1f50b5 | 86 | control in the given I<msg> copying the given I<tok> as value. See RFC 4211, |
2a3b52ea DO |
87 | section 6.3. |
88 | ||
89 | OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey() sets the protocolEncrKey control in | |
6d1f50b5 | 90 | the given I<msg> copying the given I<pubkey> as value. See RFC 4211 section 6.6. |
2a3b52ea DO |
91 | |
92 | OSSL_CRMF_MSG_set1_regCtrl_oldCertID() sets the oldCertID control in the given | |
6d1f50b5 | 93 | I<msg> copying the given I<cid> as value. See RFC 4211, section 6.5. |
2a3b52ea DO |
94 | |
95 | OSSL_CRMF_CERTID_gen produces an OSSL_CRMF_CERTID_gen structure copying the | |
6d1f50b5 | 96 | given I<issuer> name and I<serial> number. |
2a3b52ea DO |
97 | |
98 | =head1 RETURN VALUES | |
99 | ||
7df56ada DDO |
100 | All OSSL_CRMF_MSG_get0_*() functions |
101 | return the respective pointer value or NULL if not present and on error. | |
2a3b52ea | 102 | |
7df56ada DDO |
103 | All OSSL_CRMF_MSG_set1_*() functions return 1 on success, 0 on error. |
104 | ||
105 | OSSL_CRMF_CERTID_gen() returns a pointer to the resulting structure | |
106 | or NULL on error. | |
2a3b52ea DO |
107 | |
108 | =head1 NOTES | |
109 | ||
110 | A function OSSL_CRMF_MSG_set1_regCtrl_pkiArchiveOptions() for setting an | |
111 | Archive Options Control is not yet implemented due to missing features to | |
112 | create the needed OSSL_CRMF_PKIARCHIVEOPTINS content. | |
113 | ||
114 | =head1 SEE ALSO | |
115 | ||
116 | RFC 4211 | |
117 | ||
7960dbec DDO |
118 | =head1 HISTORY |
119 | ||
120 | The OpenSSL CRMF support was added in OpenSSL 3.0. | |
121 | ||
2a3b52ea DO |
122 | =head1 COPYRIGHT |
123 | ||
eec0ad10 | 124 | Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved. |
2a3b52ea | 125 | |
ce9b9964 | 126 | Licensed under the Apache License 2.0 (the "License"). You may not use |
2a3b52ea DO |
127 | this file except in compliance with the License. You can obtain a copy |
128 | in the file LICENSE in the source distribution or at | |
129 | L<https://www.openssl.org/source/license.html>. | |
130 | ||
131 | =cut |