]>
Commit | Line | Data |
---|---|---|
2a3b52ea DO |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | OSSL_CRMF_MSG_get0_tmpl, | |
6 | OSSL_CRMF_CERTTEMPLATE_get0_serialNumber, | |
7df56ada | 7 | OSSL_CRMF_CERTTEMPLATE_get0_subject, |
2a3b52ea | 8 | OSSL_CRMF_CERTTEMPLATE_get0_issuer, |
7df56ada | 9 | OSSL_CRMF_CERTTEMPLATE_get0_extensions, |
7960dbec DDO |
10 | OSSL_CRMF_CERTID_get0_serialNumber, |
11 | OSSL_CRMF_CERTID_get0_issuer, | |
2a3b52ea DO |
12 | OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert, |
13 | OSSL_CRMF_MSG_get_certReqId | |
14 | - functions reading from CRMF CertReqMsg structures | |
15 | ||
16 | =head1 SYNOPSIS | |
17 | ||
18 | #include <openssl/crmf.h> | |
19 | ||
20 | OSSL_CRMF_CERTTEMPLATE *OSSL_CRMF_MSG_get0_tmpl(const OSSL_CRMF_MSG *crm); | |
21 | ASN1_INTEGER | |
05f920db DDO |
22 | *OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(const OSSL_CRMF_CERTTEMPLATE *tmpl); |
23 | X509_NAME | |
7df56ada DDO |
24 | *OSSL_CRMF_CERTTEMPLATE_get0_subject(const OSSL_CRMF_CERTTEMPLATE *tmpl); |
25 | X509_NAME | |
05f920db | 26 | *OSSL_CRMF_CERTTEMPLATE_get0_issuer(const OSSL_CRMF_CERTTEMPLATE *tmpl); |
7df56ada DDO |
27 | X509_EXTENSIONS |
28 | *OSSL_CRMF_CERTTEMPLATE_get0_extensions(const OSSL_CRMF_CERTTEMPLATE *tmpl); | |
2a3b52ea | 29 | |
7960dbec | 30 | ASN1_INTEGER *OSSL_CRMF_CERTID_get0_serialNumber(const OSSL_CRMF_CERTID *cid); |
8cc86b81 | 31 | const X509_NAME *OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid); |
7960dbec | 32 | |
05f920db DDO |
33 | X509 |
34 | *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert, | |
b4250010 | 35 | OSSL_LIB_CTX *libctx, const char *propq, |
05f920db | 36 | EVP_PKEY *pkey); |
2a3b52ea | 37 | |
05f920db | 38 | int OSSL_CRMF_MSG_get_certReqId(const OSSL_CRMF_MSG *crm); |
2a3b52ea DO |
39 | |
40 | ||
41 | =head1 DESCRIPTION | |
42 | ||
6d1f50b5 | 43 | OSSL_CRMF_MSG_get0_tmpl() retrieves the certificate template of I<crm>. |
2a3b52ea DO |
44 | |
45 | OSSL_CRMF_CERTTEMPLATE_get0_serialNumber() retrieves the serialNumber of the | |
6d1f50b5 | 46 | given certificate template I<tmpl>. |
2a3b52ea | 47 | |
7df56ada DDO |
48 | OSSL_CRMF_CERTTEMPLATE_get0_subject() retrieves the subject name of the |
49 | given certificate template I<tmpl>. | |
50 | ||
2a3b52ea | 51 | OSSL_CRMF_CERTTEMPLATE_get0_issuer() retrieves the issuer name of the |
6d1f50b5 | 52 | given certificate template I<tmpl>. |
2a3b52ea | 53 | |
7df56ada DDO |
54 | OSSL_CRMF_CERTTEMPLATE_get0_extensions() retrieves the X.509 extensions |
55 | of the given certificate template I<tmpl>, or NULL if not present. | |
56 | ||
7960dbec | 57 | OSSL_CRMF_CERTID_get0_serialNumber retrieves the serialNumber |
6d1f50b5 | 58 | of the given CertId I<cid>. |
7960dbec DDO |
59 | |
60 | OSSL_CRMF_CERTID_get0_issuer retrieves the issuer name | |
6d1f50b5 | 61 | of the given CertId I<cid>, which must be of ASN.1 type GEN_DIRNAME. |
7960dbec | 62 | |
2a3b52ea | 63 | OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert() decrypts the certificate in the given |
6d1f50b5 | 64 | encryptedValue I<ecert>, using the private key I<pkey>, library context |
b4250010 | 65 | I<libctx> and property query string I<propq> (see L<OSSL_LIB_CTX(3)>). |
6d1f50b5 | 66 | This is needed for the indirect POPO method as in RFC 4210 section 5.2.8.2. |
2a3b52ea DO |
67 | The function returns the decrypted certificate as a copy, leaving its ownership |
68 | with the caller, who is responsible for freeing it. | |
69 | ||
6d1f50b5 | 70 | OSSL_CRMF_MSG_get_certReqId() retrieves the certReqId of I<crm>. |
2a3b52ea DO |
71 | |
72 | ||
73 | =head1 RETURN VALUES | |
74 | ||
75 | OSSL_CRMF_MSG_get_certReqId() returns the certificate request ID as a | |
490c8711 | 76 | nonnegative integer or -1 on error. |
2a3b52ea DO |
77 | |
78 | All other functions return a pointer with the intended result or NULL on error. | |
79 | ||
80 | =head1 SEE ALSO | |
81 | ||
6d1f50b5 | 82 | RFC 4211 |
2a3b52ea | 83 | |
7960dbec DDO |
84 | =head1 HISTORY |
85 | ||
86 | The OpenSSL CRMF support was added in OpenSSL 3.0. | |
87 | ||
2a3b52ea DO |
88 | =head1 COPYRIGHT |
89 | ||
33388b44 | 90 | Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved. |
2a3b52ea | 91 | |
ce9b9964 | 92 | Licensed under the Apache License 2.0 (the "License"). You may not use |
2a3b52ea DO |
93 | this file except in compliance with the License. You can obtain a copy |
94 | in the file LICENSE in the source distribution or at | |
95 | L<https://www.openssl.org/source/license.html>. | |
96 | ||
97 | =cut |