xref: /freebsd/crypto/openssl/providers/implementations/keymgmt/ec_kmgmt_imexport.inc (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1/*
2 * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License").  You may not use
5 * this file except in compliance with the License.  You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8*/
9
10/*
11 * This file is meant to be included from ec_kmgmt.c
12 */
13
14static const OSSL_PARAM ec_private_key_types[] = {
15    EC_IMEXPORTABLE_PRIVATE_KEY,
16    OSSL_PARAM_END
17};
18static const OSSL_PARAM ec_public_key_types[] = {
19    EC_IMEXPORTABLE_PUBLIC_KEY,
20    OSSL_PARAM_END
21};
22static const OSSL_PARAM ec_key_types[] = {
23    EC_IMEXPORTABLE_PRIVATE_KEY,
24    EC_IMEXPORTABLE_PUBLIC_KEY,
25    OSSL_PARAM_END
26};
27static const OSSL_PARAM ec_dom_parameters_types[] = {
28    EC_IMEXPORTABLE_DOM_PARAMETERS,
29    OSSL_PARAM_END
30};
31static const OSSL_PARAM ec_5_types[] = {
32    EC_IMEXPORTABLE_PRIVATE_KEY,
33    EC_IMEXPORTABLE_DOM_PARAMETERS,
34    OSSL_PARAM_END
35};
36static const OSSL_PARAM ec_6_types[] = {
37    EC_IMEXPORTABLE_PUBLIC_KEY,
38    EC_IMEXPORTABLE_DOM_PARAMETERS,
39    OSSL_PARAM_END
40};
41static const OSSL_PARAM ec_key_domp_types[] = {
42    EC_IMEXPORTABLE_PRIVATE_KEY,
43    EC_IMEXPORTABLE_PUBLIC_KEY,
44    EC_IMEXPORTABLE_DOM_PARAMETERS,
45    OSSL_PARAM_END
46};
47static const OSSL_PARAM ec_other_parameters_types[] = {
48    EC_IMEXPORTABLE_OTHER_PARAMETERS,
49    OSSL_PARAM_END
50};
51static const OSSL_PARAM ec_9_types[] = {
52    EC_IMEXPORTABLE_PRIVATE_KEY,
53    EC_IMEXPORTABLE_OTHER_PARAMETERS,
54    OSSL_PARAM_END
55};
56static const OSSL_PARAM ec_10_types[] = {
57    EC_IMEXPORTABLE_PUBLIC_KEY,
58    EC_IMEXPORTABLE_OTHER_PARAMETERS,
59    OSSL_PARAM_END
60};
61static const OSSL_PARAM ec_11_types[] = {
62    EC_IMEXPORTABLE_PRIVATE_KEY,
63    EC_IMEXPORTABLE_PUBLIC_KEY,
64    EC_IMEXPORTABLE_OTHER_PARAMETERS,
65    OSSL_PARAM_END
66};
67static const OSSL_PARAM ec_all_parameters_types[] = {
68    EC_IMEXPORTABLE_DOM_PARAMETERS,
69    EC_IMEXPORTABLE_OTHER_PARAMETERS,
70    OSSL_PARAM_END
71};
72static const OSSL_PARAM ec_13_types[] = {
73    EC_IMEXPORTABLE_PRIVATE_KEY,
74    EC_IMEXPORTABLE_DOM_PARAMETERS,
75    EC_IMEXPORTABLE_OTHER_PARAMETERS,
76    OSSL_PARAM_END
77};
78static const OSSL_PARAM ec_14_types[] = {
79    EC_IMEXPORTABLE_PUBLIC_KEY,
80    EC_IMEXPORTABLE_DOM_PARAMETERS,
81    EC_IMEXPORTABLE_OTHER_PARAMETERS,
82    OSSL_PARAM_END
83};
84static const OSSL_PARAM ec_all_types[] = {
85    EC_IMEXPORTABLE_PRIVATE_KEY,
86    EC_IMEXPORTABLE_PUBLIC_KEY,
87    EC_IMEXPORTABLE_DOM_PARAMETERS,
88    EC_IMEXPORTABLE_OTHER_PARAMETERS,
89    OSSL_PARAM_END
90};
91
92static const OSSL_PARAM *ec_types[] = {
93    NULL,
94    ec_private_key_types,
95    ec_public_key_types,
96    ec_key_types,
97    ec_dom_parameters_types,
98    ec_5_types,
99    ec_6_types,
100    ec_key_domp_types,
101    ec_other_parameters_types,
102    ec_9_types,
103    ec_10_types,
104    ec_11_types,
105    ec_all_parameters_types,
106    ec_13_types,
107    ec_14_types,
108    ec_all_types
109};
110