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