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