/src/openssl/providers/defltprov.c
Line  | Count  | Source (jump to first uncovered line)  | 
1  |  | /*  | 
2  |  |  * Copyright 2019-2023 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  |  | #include <string.h>  | 
11  |  | #include <stdio.h>  | 
12  |  | #include <openssl/opensslconf.h>  | 
13  |  | #include <openssl/core.h>  | 
14  |  | #include <openssl/core_dispatch.h>  | 
15  |  | #include <openssl/core_names.h>  | 
16  |  | #include <openssl/params.h>  | 
17  |  | #include "prov/bio.h"  | 
18  |  | #include "prov/provider_ctx.h"  | 
19  |  | #include "prov/providercommon.h"  | 
20  |  | #include "prov/implementations.h"  | 
21  |  | #include "prov/names.h"  | 
22  |  | #include "prov/provider_util.h"  | 
23  |  | #include "prov/seeding.h"  | 
24  |  | #include "internal/nelem.h"  | 
25  |  |  | 
26  |  | /*  | 
27  |  |  * Forward declarations to ensure that interface functions are correctly  | 
28  |  |  * defined.  | 
29  |  |  */  | 
30  |  | static OSSL_FUNC_provider_gettable_params_fn deflt_gettable_params;  | 
31  |  | static OSSL_FUNC_provider_get_params_fn deflt_get_params;  | 
32  |  | static OSSL_FUNC_provider_query_operation_fn deflt_query;  | 
33  |  |  | 
34  |  | #define ALGC(NAMES, FUNC, CHECK) { { NAMES, "provider=default", FUNC }, CHECK } | 
35  |  | #define ALG(NAMES, FUNC) ALGC(NAMES, FUNC, NULL)  | 
36  |  |  | 
37  |  | /* Functions provided by the core */  | 
38  |  | static OSSL_FUNC_core_gettable_params_fn *c_gettable_params = NULL;  | 
39  |  | static OSSL_FUNC_core_get_params_fn *c_get_params = NULL;  | 
40  |  |  | 
41  |  | /* Parameters we provide to the core */  | 
42  |  | static const OSSL_PARAM deflt_param_types[] = { | 
43  |  |     OSSL_PARAM_DEFN(OSSL_PROV_PARAM_NAME, OSSL_PARAM_UTF8_PTR, NULL, 0),  | 
44  |  |     OSSL_PARAM_DEFN(OSSL_PROV_PARAM_VERSION, OSSL_PARAM_UTF8_PTR, NULL, 0),  | 
45  |  |     OSSL_PARAM_DEFN(OSSL_PROV_PARAM_BUILDINFO, OSSL_PARAM_UTF8_PTR, NULL, 0),  | 
46  |  |     OSSL_PARAM_DEFN(OSSL_PROV_PARAM_STATUS, OSSL_PARAM_INTEGER, NULL, 0),  | 
47  |  |     OSSL_PARAM_END  | 
48  |  | };  | 
49  |  |  | 
50  |  | static const OSSL_PARAM *deflt_gettable_params(void *provctx)  | 
51  | 0  | { | 
52  | 0  |     return deflt_param_types;  | 
53  | 0  | }  | 
54  |  |  | 
55  |  | static int deflt_get_params(void *provctx, OSSL_PARAM params[])  | 
56  | 0  | { | 
57  | 0  |     OSSL_PARAM *p;  | 
58  |  | 
  | 
59  | 0  |     p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_NAME);  | 
60  | 0  |     if (p != NULL && !OSSL_PARAM_set_utf8_ptr(p, "OpenSSL Default Provider"))  | 
61  | 0  |         return 0;  | 
62  | 0  |     p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_VERSION);  | 
63  | 0  |     if (p != NULL && !OSSL_PARAM_set_utf8_ptr(p, OPENSSL_VERSION_STR))  | 
64  | 0  |         return 0;  | 
65  | 0  |     p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_BUILDINFO);  | 
66  | 0  |     if (p != NULL && !OSSL_PARAM_set_utf8_ptr(p, OPENSSL_FULL_VERSION_STR))  | 
67  | 0  |         return 0;  | 
68  | 0  |     p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_STATUS);  | 
69  | 0  |     if (p != NULL && !OSSL_PARAM_set_int(p, ossl_prov_is_running()))  | 
70  | 0  |         return 0;  | 
71  | 0  |     return 1;  | 
72  | 0  | }  | 
73  |  |  | 
74  |  | /*  | 
75  |  |  * For the algorithm names, we use the following formula for our primary  | 
76  |  |  * names:  | 
77  |  |  *  | 
78  |  |  *     ALGNAME[VERSION?][-SUBNAME[VERSION?]?][-SIZE?][-MODE?]  | 
79  |  |  *  | 
80  |  |  *     VERSION is only present if there are multiple versions of  | 
81  |  |  *     an alg (MD2, MD4, MD5).  It may be omitted if there is only  | 
82  |  |  *     one version (if a subsequent version is released in the future,  | 
83  |  |  *     we can always change the canonical name, and add the old name  | 
84  |  |  *     as an alias).  | 
85  |  |  *  | 
86  |  |  *     SUBNAME may be present where we are combining multiple  | 
87  |  |  *     algorithms together, e.g. MD5-SHA1.  | 
88  |  |  *  | 
89  |  |  *     SIZE is only present if multiple versions of an algorithm exist  | 
90  |  |  *     with different sizes (e.g. AES-128-CBC, AES-256-CBC)  | 
91  |  |  *  | 
92  |  |  *     MODE is only present where applicable.  | 
93  |  |  *  | 
94  |  |  * We add diverse other names where applicable, such as the names that  | 
95  |  |  * NIST uses, or that are used for ASN.1 OBJECT IDENTIFIERs, or names  | 
96  |  |  * we have used historically.  | 
97  |  |  *  | 
98  |  |  * Algorithm names are case insensitive, but we use all caps in our "canonical"  | 
99  |  |  * names for consistency.  | 
100  |  |  */  | 
101  |  | static const OSSL_ALGORITHM deflt_digests[] = { | 
102  |  |     /* Our primary name:NIST name[:our older names] */  | 
103  |  |     { PROV_NAMES_SHA1, "provider=default", ossl_sha1_functions }, | 
104  |  |     { PROV_NAMES_SHA2_224, "provider=default", ossl_sha224_functions }, | 
105  |  |     { PROV_NAMES_SHA2_256, "provider=default", ossl_sha256_functions }, | 
106  |  |     { PROV_NAMES_SHA2_256_192, "provider=default", ossl_sha256_192_functions }, | 
107  |  |     { PROV_NAMES_SHA2_384, "provider=default", ossl_sha384_functions }, | 
108  |  |     { PROV_NAMES_SHA2_512, "provider=default", ossl_sha512_functions }, | 
109  |  |     { PROV_NAMES_SHA2_512_224, "provider=default", ossl_sha512_224_functions }, | 
110  |  |     { PROV_NAMES_SHA2_512_256, "provider=default", ossl_sha512_256_functions }, | 
111  |  |  | 
112  |  |     /* We agree with NIST here, so one name only */  | 
113  |  |     { PROV_NAMES_SHA3_224, "provider=default", ossl_sha3_224_functions }, | 
114  |  |     { PROV_NAMES_SHA3_256, "provider=default", ossl_sha3_256_functions }, | 
115  |  |     { PROV_NAMES_SHA3_384, "provider=default", ossl_sha3_384_functions }, | 
116  |  |     { PROV_NAMES_SHA3_512, "provider=default", ossl_sha3_512_functions }, | 
117  |  |  | 
118  |  |     { PROV_NAMES_KECCAK_224, "provider=default", ossl_keccak_224_functions }, | 
119  |  |     { PROV_NAMES_KECCAK_256, "provider=default", ossl_keccak_256_functions }, | 
120  |  |     { PROV_NAMES_KECCAK_384, "provider=default", ossl_keccak_384_functions }, | 
121  |  |     { PROV_NAMES_KECCAK_512, "provider=default", ossl_keccak_512_functions }, | 
122  |  |  | 
123  |  |     /*  | 
124  |  |      * KECCAK-KMAC-128 and KECCAK-KMAC-256 as hashes are mostly useful for  | 
125  |  |      * the KMAC-128 and KMAC-256.  | 
126  |  |      */  | 
127  |  |     { PROV_NAMES_KECCAK_KMAC_128, "provider=default", | 
128  |  |       ossl_keccak_kmac_128_functions },  | 
129  |  |     { PROV_NAMES_KECCAK_KMAC_256, "provider=default", | 
130  |  |       ossl_keccak_kmac_256_functions },  | 
131  |  |  | 
132  |  |     /* Our primary name:NIST name */  | 
133  |  |     { PROV_NAMES_SHAKE_128, "provider=default", ossl_shake_128_functions }, | 
134  |  |     { PROV_NAMES_SHAKE_256, "provider=default", ossl_shake_256_functions }, | 
135  |  |  | 
136  |  | #ifndef OPENSSL_NO_BLAKE2  | 
137  |  |     /*  | 
138  |  |      * https://blake2.net/ doesn't specify size variants,  | 
139  |  |      * but mentions that Bouncy Castle uses the names  | 
140  |  |      * BLAKE2b-160, BLAKE2b-256, BLAKE2b-384, and BLAKE2b-512  | 
141  |  |      * If we assume that "2b" and "2s" are versions, that pattern  | 
142  |  |      * fits with ours.  We also add our historical names.  | 
143  |  |      */  | 
144  |  |     { PROV_NAMES_BLAKE2S_256, "provider=default", ossl_blake2s256_functions }, | 
145  |  |     { PROV_NAMES_BLAKE2B_512, "provider=default", ossl_blake2b512_functions }, | 
146  |  | #endif /* OPENSSL_NO_BLAKE2 */  | 
147  |  |  | 
148  |  | #ifndef OPENSSL_NO_SM3  | 
149  |  |     { PROV_NAMES_SM3, "provider=default", ossl_sm3_functions }, | 
150  |  | #endif /* OPENSSL_NO_SM3 */  | 
151  |  |  | 
152  |  | #ifndef OPENSSL_NO_MD5  | 
153  |  |     { PROV_NAMES_MD5, "provider=default", ossl_md5_functions }, | 
154  |  |     { PROV_NAMES_MD5_SHA1, "provider=default", ossl_md5_sha1_functions }, | 
155  |  | #endif /* OPENSSL_NO_MD5 */  | 
156  |  |  | 
157  |  | #ifndef OPENSSL_NO_RMD160  | 
158  |  |     { PROV_NAMES_RIPEMD_160, "provider=default", ossl_ripemd160_functions }, | 
159  |  | #endif /* OPENSSL_NO_RMD160 */  | 
160  |  |  | 
161  |  |     { PROV_NAMES_NULL, "provider=default", ossl_nullmd_functions }, | 
162  |  |     { NULL, NULL, NULL } | 
163  |  | };  | 
164  |  |  | 
165  |  | static const OSSL_ALGORITHM_CAPABLE deflt_ciphers[] = { | 
166  |  |     ALG(PROV_NAMES_NULL, ossl_null_functions),  | 
167  |  |     ALG(PROV_NAMES_AES_256_ECB, ossl_aes256ecb_functions),  | 
168  |  |     ALG(PROV_NAMES_AES_192_ECB, ossl_aes192ecb_functions),  | 
169  |  |     ALG(PROV_NAMES_AES_128_ECB, ossl_aes128ecb_functions),  | 
170  |  |     ALG(PROV_NAMES_AES_256_CBC, ossl_aes256cbc_functions),  | 
171  |  |     ALG(PROV_NAMES_AES_192_CBC, ossl_aes192cbc_functions),  | 
172  |  |     ALG(PROV_NAMES_AES_128_CBC, ossl_aes128cbc_functions),  | 
173  |  |     ALG(PROV_NAMES_AES_128_CBC_CTS, ossl_aes128cbc_cts_functions),  | 
174  |  |     ALG(PROV_NAMES_AES_192_CBC_CTS, ossl_aes192cbc_cts_functions),  | 
175  |  |     ALG(PROV_NAMES_AES_256_CBC_CTS, ossl_aes256cbc_cts_functions),  | 
176  |  |     ALG(PROV_NAMES_AES_256_OFB, ossl_aes256ofb_functions),  | 
177  |  |     ALG(PROV_NAMES_AES_192_OFB, ossl_aes192ofb_functions),  | 
178  |  |     ALG(PROV_NAMES_AES_128_OFB, ossl_aes128ofb_functions),  | 
179  |  |     ALG(PROV_NAMES_AES_256_CFB, ossl_aes256cfb_functions),  | 
180  |  |     ALG(PROV_NAMES_AES_192_CFB, ossl_aes192cfb_functions),  | 
181  |  |     ALG(PROV_NAMES_AES_128_CFB, ossl_aes128cfb_functions),  | 
182  |  |     ALG(PROV_NAMES_AES_256_CFB1, ossl_aes256cfb1_functions),  | 
183  |  |     ALG(PROV_NAMES_AES_192_CFB1, ossl_aes192cfb1_functions),  | 
184  |  |     ALG(PROV_NAMES_AES_128_CFB1, ossl_aes128cfb1_functions),  | 
185  |  |     ALG(PROV_NAMES_AES_256_CFB8, ossl_aes256cfb8_functions),  | 
186  |  |     ALG(PROV_NAMES_AES_192_CFB8, ossl_aes192cfb8_functions),  | 
187  |  |     ALG(PROV_NAMES_AES_128_CFB8, ossl_aes128cfb8_functions),  | 
188  |  |     ALG(PROV_NAMES_AES_256_CTR, ossl_aes256ctr_functions),  | 
189  |  |     ALG(PROV_NAMES_AES_192_CTR, ossl_aes192ctr_functions),  | 
190  |  |     ALG(PROV_NAMES_AES_128_CTR, ossl_aes128ctr_functions),  | 
191  |  |     ALG(PROV_NAMES_AES_256_XTS, ossl_aes256xts_functions),  | 
192  |  |     ALG(PROV_NAMES_AES_128_XTS, ossl_aes128xts_functions),  | 
193  |  | #ifndef OPENSSL_NO_OCB  | 
194  |  |     ALG(PROV_NAMES_AES_256_OCB, ossl_aes256ocb_functions),  | 
195  |  |     ALG(PROV_NAMES_AES_192_OCB, ossl_aes192ocb_functions),  | 
196  |  |     ALG(PROV_NAMES_AES_128_OCB, ossl_aes128ocb_functions),  | 
197  |  | #endif /* OPENSSL_NO_OCB */  | 
198  |  | #ifndef OPENSSL_NO_SIV  | 
199  |  |     ALG(PROV_NAMES_AES_128_SIV, ossl_aes128siv_functions),  | 
200  |  |     ALG(PROV_NAMES_AES_192_SIV, ossl_aes192siv_functions),  | 
201  |  |     ALG(PROV_NAMES_AES_256_SIV, ossl_aes256siv_functions),  | 
202  |  |     ALG(PROV_NAMES_AES_128_GCM_SIV, ossl_aes128gcm_siv_functions),  | 
203  |  |     ALG(PROV_NAMES_AES_192_GCM_SIV, ossl_aes192gcm_siv_functions),  | 
204  |  |     ALG(PROV_NAMES_AES_256_GCM_SIV, ossl_aes256gcm_siv_functions),  | 
205  |  | #endif /* OPENSSL_NO_SIV */  | 
206  |  |     ALG(PROV_NAMES_AES_256_GCM, ossl_aes256gcm_functions),  | 
207  |  |     ALG(PROV_NAMES_AES_192_GCM, ossl_aes192gcm_functions),  | 
208  |  |     ALG(PROV_NAMES_AES_128_GCM, ossl_aes128gcm_functions),  | 
209  |  |     ALG(PROV_NAMES_AES_256_CCM, ossl_aes256ccm_functions),  | 
210  |  |     ALG(PROV_NAMES_AES_192_CCM, ossl_aes192ccm_functions),  | 
211  |  |     ALG(PROV_NAMES_AES_128_CCM, ossl_aes128ccm_functions),  | 
212  |  |     ALG(PROV_NAMES_AES_256_WRAP, ossl_aes256wrap_functions),  | 
213  |  |     ALG(PROV_NAMES_AES_192_WRAP, ossl_aes192wrap_functions),  | 
214  |  |     ALG(PROV_NAMES_AES_128_WRAP, ossl_aes128wrap_functions),  | 
215  |  |     ALG(PROV_NAMES_AES_256_WRAP_PAD, ossl_aes256wrappad_functions),  | 
216  |  |     ALG(PROV_NAMES_AES_192_WRAP_PAD, ossl_aes192wrappad_functions),  | 
217  |  |     ALG(PROV_NAMES_AES_128_WRAP_PAD, ossl_aes128wrappad_functions),  | 
218  |  |     ALG(PROV_NAMES_AES_256_WRAP_INV, ossl_aes256wrapinv_functions),  | 
219  |  |     ALG(PROV_NAMES_AES_192_WRAP_INV, ossl_aes192wrapinv_functions),  | 
220  |  |     ALG(PROV_NAMES_AES_128_WRAP_INV, ossl_aes128wrapinv_functions),  | 
221  |  |     ALG(PROV_NAMES_AES_256_WRAP_PAD_INV, ossl_aes256wrappadinv_functions),  | 
222  |  |     ALG(PROV_NAMES_AES_192_WRAP_PAD_INV, ossl_aes192wrappadinv_functions),  | 
223  |  |     ALG(PROV_NAMES_AES_128_WRAP_PAD_INV, ossl_aes128wrappadinv_functions),  | 
224  |  |     ALGC(PROV_NAMES_AES_128_CBC_HMAC_SHA1, ossl_aes128cbc_hmac_sha1_functions,  | 
225  |  |          ossl_cipher_capable_aes_cbc_hmac_sha1),  | 
226  |  |     ALGC(PROV_NAMES_AES_256_CBC_HMAC_SHA1, ossl_aes256cbc_hmac_sha1_functions,  | 
227  |  |          ossl_cipher_capable_aes_cbc_hmac_sha1),  | 
228  |  |     ALGC(PROV_NAMES_AES_128_CBC_HMAC_SHA256, ossl_aes128cbc_hmac_sha256_functions,  | 
229  |  |         ossl_cipher_capable_aes_cbc_hmac_sha256),  | 
230  |  |     ALGC(PROV_NAMES_AES_256_CBC_HMAC_SHA256, ossl_aes256cbc_hmac_sha256_functions,  | 
231  |  |          ossl_cipher_capable_aes_cbc_hmac_sha256),  | 
232  |  | #ifndef OPENSSL_NO_ARIA  | 
233  |  |     ALG(PROV_NAMES_ARIA_256_GCM, ossl_aria256gcm_functions),  | 
234  |  |     ALG(PROV_NAMES_ARIA_192_GCM, ossl_aria192gcm_functions),  | 
235  |  |     ALG(PROV_NAMES_ARIA_128_GCM, ossl_aria128gcm_functions),  | 
236  |  |     ALG(PROV_NAMES_ARIA_256_CCM, ossl_aria256ccm_functions),  | 
237  |  |     ALG(PROV_NAMES_ARIA_192_CCM, ossl_aria192ccm_functions),  | 
238  |  |     ALG(PROV_NAMES_ARIA_128_CCM, ossl_aria128ccm_functions),  | 
239  |  |     ALG(PROV_NAMES_ARIA_256_ECB, ossl_aria256ecb_functions),  | 
240  |  |     ALG(PROV_NAMES_ARIA_192_ECB, ossl_aria192ecb_functions),  | 
241  |  |     ALG(PROV_NAMES_ARIA_128_ECB, ossl_aria128ecb_functions),  | 
242  |  |     ALG(PROV_NAMES_ARIA_256_CBC, ossl_aria256cbc_functions),  | 
243  |  |     ALG(PROV_NAMES_ARIA_192_CBC, ossl_aria192cbc_functions),  | 
244  |  |     ALG(PROV_NAMES_ARIA_128_CBC, ossl_aria128cbc_functions),  | 
245  |  |     ALG(PROV_NAMES_ARIA_256_OFB, ossl_aria256ofb_functions),  | 
246  |  |     ALG(PROV_NAMES_ARIA_192_OFB, ossl_aria192ofb_functions),  | 
247  |  |     ALG(PROV_NAMES_ARIA_128_OFB, ossl_aria128ofb_functions),  | 
248  |  |     ALG(PROV_NAMES_ARIA_256_CFB, ossl_aria256cfb_functions),  | 
249  |  |     ALG(PROV_NAMES_ARIA_192_CFB, ossl_aria192cfb_functions),  | 
250  |  |     ALG(PROV_NAMES_ARIA_128_CFB, ossl_aria128cfb_functions),  | 
251  |  |     ALG(PROV_NAMES_ARIA_256_CFB1, ossl_aria256cfb1_functions),  | 
252  |  |     ALG(PROV_NAMES_ARIA_192_CFB1, ossl_aria192cfb1_functions),  | 
253  |  |     ALG(PROV_NAMES_ARIA_128_CFB1, ossl_aria128cfb1_functions),  | 
254  |  |     ALG(PROV_NAMES_ARIA_256_CFB8, ossl_aria256cfb8_functions),  | 
255  |  |     ALG(PROV_NAMES_ARIA_192_CFB8, ossl_aria192cfb8_functions),  | 
256  |  |     ALG(PROV_NAMES_ARIA_128_CFB8, ossl_aria128cfb8_functions),  | 
257  |  |     ALG(PROV_NAMES_ARIA_256_CTR, ossl_aria256ctr_functions),  | 
258  |  |     ALG(PROV_NAMES_ARIA_192_CTR, ossl_aria192ctr_functions),  | 
259  |  |     ALG(PROV_NAMES_ARIA_128_CTR, ossl_aria128ctr_functions),  | 
260  |  | #endif /* OPENSSL_NO_ARIA */  | 
261  |  | #ifndef OPENSSL_NO_CAMELLIA  | 
262  |  |     ALG(PROV_NAMES_CAMELLIA_256_ECB, ossl_camellia256ecb_functions),  | 
263  |  |     ALG(PROV_NAMES_CAMELLIA_192_ECB, ossl_camellia192ecb_functions),  | 
264  |  |     ALG(PROV_NAMES_CAMELLIA_128_ECB, ossl_camellia128ecb_functions),  | 
265  |  |     ALG(PROV_NAMES_CAMELLIA_256_CBC, ossl_camellia256cbc_functions),  | 
266  |  |     ALG(PROV_NAMES_CAMELLIA_192_CBC, ossl_camellia192cbc_functions),  | 
267  |  |     ALG(PROV_NAMES_CAMELLIA_128_CBC, ossl_camellia128cbc_functions),  | 
268  |  |     ALG(PROV_NAMES_CAMELLIA_128_CBC_CTS, ossl_camellia128cbc_cts_functions),  | 
269  |  |     ALG(PROV_NAMES_CAMELLIA_192_CBC_CTS, ossl_camellia192cbc_cts_functions),  | 
270  |  |     ALG(PROV_NAMES_CAMELLIA_256_CBC_CTS, ossl_camellia256cbc_cts_functions),  | 
271  |  |     ALG(PROV_NAMES_CAMELLIA_256_OFB, ossl_camellia256ofb_functions),  | 
272  |  |     ALG(PROV_NAMES_CAMELLIA_192_OFB, ossl_camellia192ofb_functions),  | 
273  |  |     ALG(PROV_NAMES_CAMELLIA_128_OFB, ossl_camellia128ofb_functions),  | 
274  |  |     ALG(PROV_NAMES_CAMELLIA_256_CFB, ossl_camellia256cfb_functions),  | 
275  |  |     ALG(PROV_NAMES_CAMELLIA_192_CFB, ossl_camellia192cfb_functions),  | 
276  |  |     ALG(PROV_NAMES_CAMELLIA_128_CFB, ossl_camellia128cfb_functions),  | 
277  |  |     ALG(PROV_NAMES_CAMELLIA_256_CFB1, ossl_camellia256cfb1_functions),  | 
278  |  |     ALG(PROV_NAMES_CAMELLIA_192_CFB1, ossl_camellia192cfb1_functions),  | 
279  |  |     ALG(PROV_NAMES_CAMELLIA_128_CFB1, ossl_camellia128cfb1_functions),  | 
280  |  |     ALG(PROV_NAMES_CAMELLIA_256_CFB8, ossl_camellia256cfb8_functions),  | 
281  |  |     ALG(PROV_NAMES_CAMELLIA_192_CFB8, ossl_camellia192cfb8_functions),  | 
282  |  |     ALG(PROV_NAMES_CAMELLIA_128_CFB8, ossl_camellia128cfb8_functions),  | 
283  |  |     ALG(PROV_NAMES_CAMELLIA_256_CTR, ossl_camellia256ctr_functions),  | 
284  |  |     ALG(PROV_NAMES_CAMELLIA_192_CTR, ossl_camellia192ctr_functions),  | 
285  |  |     ALG(PROV_NAMES_CAMELLIA_128_CTR, ossl_camellia128ctr_functions),  | 
286  |  | #endif /* OPENSSL_NO_CAMELLIA */  | 
287  |  | #ifndef OPENSSL_NO_DES  | 
288  |  |     ALG(PROV_NAMES_DES_EDE3_ECB, ossl_tdes_ede3_ecb_functions),  | 
289  |  |     ALG(PROV_NAMES_DES_EDE3_CBC, ossl_tdes_ede3_cbc_functions),  | 
290  |  |     ALG(PROV_NAMES_DES_EDE3_OFB, ossl_tdes_ede3_ofb_functions),  | 
291  |  |     ALG(PROV_NAMES_DES_EDE3_CFB, ossl_tdes_ede3_cfb_functions),  | 
292  |  |     ALG(PROV_NAMES_DES_EDE3_CFB8, ossl_tdes_ede3_cfb8_functions),  | 
293  |  |     ALG(PROV_NAMES_DES_EDE3_CFB1, ossl_tdes_ede3_cfb1_functions),  | 
294  |  |     ALG(PROV_NAMES_DES3_WRAP, ossl_tdes_wrap_cbc_functions),  | 
295  |  |     ALG(PROV_NAMES_DES_EDE_ECB, ossl_tdes_ede2_ecb_functions),  | 
296  |  |     ALG(PROV_NAMES_DES_EDE_CBC, ossl_tdes_ede2_cbc_functions),  | 
297  |  |     ALG(PROV_NAMES_DES_EDE_OFB, ossl_tdes_ede2_ofb_functions),  | 
298  |  |     ALG(PROV_NAMES_DES_EDE_CFB, ossl_tdes_ede2_cfb_functions),  | 
299  |  | #endif /* OPENSSL_NO_DES */  | 
300  |  | #ifndef OPENSSL_NO_SM4  | 
301  |  |     ALG(PROV_NAMES_SM4_GCM, ossl_sm4128gcm_functions),  | 
302  |  |     ALG(PROV_NAMES_SM4_CCM, ossl_sm4128ccm_functions),  | 
303  |  |     ALG(PROV_NAMES_SM4_ECB, ossl_sm4128ecb_functions),  | 
304  |  |     ALG(PROV_NAMES_SM4_CBC, ossl_sm4128cbc_functions),  | 
305  |  |     ALG(PROV_NAMES_SM4_CTR, ossl_sm4128ctr_functions),  | 
306  |  |     ALG(PROV_NAMES_SM4_OFB, ossl_sm4128ofb128_functions),  | 
307  |  |     ALG(PROV_NAMES_SM4_CFB, ossl_sm4128cfb128_functions),  | 
308  |  |     ALG(PROV_NAMES_SM4_XTS, ossl_sm4128xts_functions),  | 
309  |  | #endif /* OPENSSL_NO_SM4 */  | 
310  |  | #ifndef OPENSSL_NO_CHACHA  | 
311  |  |     ALG(PROV_NAMES_ChaCha20, ossl_chacha20_functions),  | 
312  |  | # ifndef OPENSSL_NO_POLY1305  | 
313  |  |     ALG(PROV_NAMES_ChaCha20_Poly1305, ossl_chacha20_ossl_poly1305_functions),  | 
314  |  | # endif /* OPENSSL_NO_POLY1305 */  | 
315  |  | #endif /* OPENSSL_NO_CHACHA */  | 
316  |  |     { { NULL, NULL, NULL }, NULL } | 
317  |  | };  | 
318  |  | static OSSL_ALGORITHM exported_ciphers[OSSL_NELEM(deflt_ciphers)];  | 
319  |  |  | 
320  |  | static const OSSL_ALGORITHM deflt_macs[] = { | 
321  |  | #ifndef OPENSSL_NO_BLAKE2  | 
322  |  |     { PROV_NAMES_BLAKE2BMAC, "provider=default", ossl_blake2bmac_functions }, | 
323  |  |     { PROV_NAMES_BLAKE2SMAC, "provider=default", ossl_blake2smac_functions }, | 
324  |  | #endif  | 
325  |  | #ifndef OPENSSL_NO_CMAC  | 
326  |  |     { PROV_NAMES_CMAC, "provider=default", ossl_cmac_functions }, | 
327  |  | #endif  | 
328  |  |     { PROV_NAMES_GMAC, "provider=default", ossl_gmac_functions }, | 
329  |  |     { PROV_NAMES_HMAC, "provider=default", ossl_hmac_functions }, | 
330  |  |     { PROV_NAMES_KMAC_128, "provider=default", ossl_kmac128_functions }, | 
331  |  |     { PROV_NAMES_KMAC_256, "provider=default", ossl_kmac256_functions }, | 
332  |  | #ifndef OPENSSL_NO_SIPHASH  | 
333  |  |     { PROV_NAMES_SIPHASH, "provider=default", ossl_siphash_functions }, | 
334  |  | #endif  | 
335  |  | #ifndef OPENSSL_NO_POLY1305  | 
336  |  |     { PROV_NAMES_POLY1305, "provider=default", ossl_poly1305_functions }, | 
337  |  | #endif  | 
338  |  |     { NULL, NULL, NULL } | 
339  |  | };  | 
340  |  |  | 
341  |  | static const OSSL_ALGORITHM deflt_kdfs[] = { | 
342  |  |     { PROV_NAMES_HKDF, "provider=default", ossl_kdf_hkdf_functions }, | 
343  |  |     { PROV_NAMES_TLS1_3_KDF, "provider=default", | 
344  |  |       ossl_kdf_tls1_3_kdf_functions },  | 
345  |  |     { PROV_NAMES_SSKDF, "provider=default", ossl_kdf_sskdf_functions }, | 
346  |  |     { PROV_NAMES_PBKDF2, "provider=default", ossl_kdf_pbkdf2_functions }, | 
347  |  |     { PROV_NAMES_PKCS12KDF, "provider=default", ossl_kdf_pkcs12_functions }, | 
348  |  |     { PROV_NAMES_SSHKDF, "provider=default", ossl_kdf_sshkdf_functions }, | 
349  |  |     { PROV_NAMES_X963KDF, "provider=default", ossl_kdf_x963_kdf_functions }, | 
350  |  |     { PROV_NAMES_TLS1_PRF, "provider=default", ossl_kdf_tls1_prf_functions }, | 
351  |  |     { PROV_NAMES_KBKDF, "provider=default", ossl_kdf_kbkdf_functions }, | 
352  |  |     { PROV_NAMES_X942KDF_ASN1, "provider=default", ossl_kdf_x942_kdf_functions }, | 
353  |  | #ifndef OPENSSL_NO_SCRYPT  | 
354  |  |     { PROV_NAMES_SCRYPT, "provider=default", ossl_kdf_scrypt_functions }, | 
355  |  | #endif  | 
356  |  |     { PROV_NAMES_KRB5KDF, "provider=default", ossl_kdf_krb5kdf_functions }, | 
357  |  |     { PROV_NAMES_HMAC_DRBG_KDF, "provider=default", | 
358  |  |       ossl_kdf_hmac_drbg_functions },  | 
359  |  | #ifndef OPENSSL_NO_ARGON2  | 
360  |  |     { PROV_NAMES_ARGON2I, "provider=default", ossl_kdf_argon2i_functions }, | 
361  |  |     { PROV_NAMES_ARGON2D, "provider=default", ossl_kdf_argon2d_functions }, | 
362  |  |     { PROV_NAMES_ARGON2ID, "provider=default", ossl_kdf_argon2id_functions }, | 
363  |  | #endif  | 
364  |  |     { NULL, NULL, NULL } | 
365  |  | };  | 
366  |  |  | 
367  |  | static const OSSL_ALGORITHM deflt_keyexch[] = { | 
368  |  | #ifndef OPENSSL_NO_DH  | 
369  |  |     { PROV_NAMES_DH, "provider=default", ossl_dh_keyexch_functions }, | 
370  |  | #endif  | 
371  |  | #ifndef OPENSSL_NO_EC  | 
372  |  |     { PROV_NAMES_ECDH, "provider=default", ossl_ecdh_keyexch_functions }, | 
373  |  | # ifndef OPENSSL_NO_ECX  | 
374  |  |     { PROV_NAMES_X25519, "provider=default", ossl_x25519_keyexch_functions }, | 
375  |  |     { PROV_NAMES_X448, "provider=default", ossl_x448_keyexch_functions }, | 
376  |  | # endif  | 
377  |  | #endif  | 
378  |  |     { PROV_NAMES_TLS1_PRF, "provider=default", ossl_kdf_tls1_prf_keyexch_functions }, | 
379  |  |     { PROV_NAMES_HKDF, "provider=default", ossl_kdf_hkdf_keyexch_functions }, | 
380  |  |     { PROV_NAMES_SCRYPT, "provider=default", | 
381  |  |       ossl_kdf_scrypt_keyexch_functions },  | 
382  |  |     { NULL, NULL, NULL } | 
383  |  | };  | 
384  |  |  | 
385  |  | static const OSSL_ALGORITHM deflt_rands[] = { | 
386  |  |     { PROV_NAMES_CTR_DRBG, "provider=default", ossl_drbg_ctr_functions }, | 
387  |  |     { PROV_NAMES_HASH_DRBG, "provider=default", ossl_drbg_hash_functions }, | 
388  |  |     { PROV_NAMES_HMAC_DRBG, "provider=default", ossl_drbg_ossl_hmac_functions }, | 
389  |  |     { PROV_NAMES_SEED_SRC, "provider=default", ossl_seed_src_functions }, | 
390  |  |     { PROV_NAMES_TEST_RAND, "provider=default", ossl_test_rng_functions }, | 
391  |  |     { NULL, NULL, NULL } | 
392  |  | };  | 
393  |  |  | 
394  |  | static const OSSL_ALGORITHM deflt_signature[] = { | 
395  |  | #ifndef OPENSSL_NO_DSA  | 
396  |  |     { PROV_NAMES_DSA, "provider=default", ossl_dsa_signature_functions }, | 
397  |  | #endif  | 
398  |  |     { PROV_NAMES_RSA, "provider=default", ossl_rsa_signature_functions }, | 
399  |  | #ifndef OPENSSL_NO_EC  | 
400  |  | # ifndef OPENSSL_NO_ECX  | 
401  |  |     { PROV_NAMES_ED25519, "provider=default", ossl_ed25519_signature_functions }, | 
402  |  |     { PROV_NAMES_ED448, "provider=default", ossl_ed448_signature_functions }, | 
403  |  | # endif  | 
404  |  |     { PROV_NAMES_ECDSA, "provider=default", ossl_ecdsa_signature_functions }, | 
405  |  | # ifndef OPENSSL_NO_SM2  | 
406  |  |     { PROV_NAMES_SM2, "provider=default", ossl_sm2_signature_functions }, | 
407  |  | # endif  | 
408  |  | #endif  | 
409  |  |     { PROV_NAMES_HMAC, "provider=default", ossl_mac_legacy_hmac_signature_functions }, | 
410  |  |     { PROV_NAMES_SIPHASH, "provider=default", | 
411  |  |       ossl_mac_legacy_siphash_signature_functions },  | 
412  |  | #ifndef OPENSSL_NO_POLY1305  | 
413  |  |     { PROV_NAMES_POLY1305, "provider=default", | 
414  |  |       ossl_mac_legacy_poly1305_signature_functions },  | 
415  |  | #endif  | 
416  |  | #ifndef OPENSSL_NO_CMAC  | 
417  |  |     { PROV_NAMES_CMAC, "provider=default", ossl_mac_legacy_cmac_signature_functions }, | 
418  |  | #endif  | 
419  |  |     { NULL, NULL, NULL } | 
420  |  | };  | 
421  |  |  | 
422  |  | static const OSSL_ALGORITHM deflt_asym_cipher[] = { | 
423  |  |     { PROV_NAMES_RSA, "provider=default", ossl_rsa_asym_cipher_functions }, | 
424  |  | #ifndef OPENSSL_NO_SM2  | 
425  |  |     { PROV_NAMES_SM2, "provider=default", ossl_sm2_asym_cipher_functions }, | 
426  |  | #endif  | 
427  |  |     { NULL, NULL, NULL } | 
428  |  | };  | 
429  |  |  | 
430  |  | static const OSSL_ALGORITHM deflt_asym_kem[] = { | 
431  |  |     { PROV_NAMES_RSA, "provider=default", ossl_rsa_asym_kem_functions }, | 
432  |  | #ifndef OPENSSL_NO_EC  | 
433  |  | # ifndef OPENSSL_NO_ECX  | 
434  |  |     { PROV_NAMES_X25519, "provider=default", ossl_ecx_asym_kem_functions }, | 
435  |  |     { PROV_NAMES_X448, "provider=default", ossl_ecx_asym_kem_functions }, | 
436  |  | # endif  | 
437  |  |     { PROV_NAMES_EC, "provider=default", ossl_ec_asym_kem_functions }, | 
438  |  | #endif  | 
439  |  |     { NULL, NULL, NULL } | 
440  |  | };  | 
441  |  |  | 
442  |  | static const OSSL_ALGORITHM deflt_keymgmt[] = { | 
443  |  | #ifndef OPENSSL_NO_DH  | 
444  |  |     { PROV_NAMES_DH, "provider=default", ossl_dh_keymgmt_functions, | 
445  |  |       PROV_DESCS_DH },  | 
446  |  |     { PROV_NAMES_DHX, "provider=default", ossl_dhx_keymgmt_functions, | 
447  |  |       PROV_DESCS_DHX },  | 
448  |  | #endif  | 
449  |  | #ifndef OPENSSL_NO_DSA  | 
450  |  |     { PROV_NAMES_DSA, "provider=default", ossl_dsa_keymgmt_functions, | 
451  |  |       PROV_DESCS_DSA},  | 
452  |  | #endif  | 
453  |  |     { PROV_NAMES_RSA, "provider=default", ossl_rsa_keymgmt_functions, | 
454  |  |       PROV_DESCS_RSA },  | 
455  |  |     { PROV_NAMES_RSA_PSS, "provider=default", ossl_rsapss_keymgmt_functions, | 
456  |  |       PROV_DESCS_RSA_PSS },  | 
457  |  | #ifndef OPENSSL_NO_EC  | 
458  |  |     { PROV_NAMES_EC, "provider=default", ossl_ec_keymgmt_functions, | 
459  |  |       PROV_DESCS_EC },  | 
460  |  | # ifndef OPENSSL_NO_ECX  | 
461  |  |     { PROV_NAMES_X25519, "provider=default", ossl_x25519_keymgmt_functions, | 
462  |  |       PROV_DESCS_X25519 },  | 
463  |  |     { PROV_NAMES_X448, "provider=default", ossl_x448_keymgmt_functions, | 
464  |  |       PROV_DESCS_X448 },  | 
465  |  |     { PROV_NAMES_ED25519, "provider=default", ossl_ed25519_keymgmt_functions, | 
466  |  |       PROV_DESCS_ED25519 },  | 
467  |  |     { PROV_NAMES_ED448, "provider=default", ossl_ed448_keymgmt_functions, | 
468  |  |       PROV_DESCS_ED448 },  | 
469  |  | # endif  | 
470  |  | #endif  | 
471  |  |     { PROV_NAMES_TLS1_PRF, "provider=default", ossl_kdf_keymgmt_functions, | 
472  |  |       PROV_DESCS_TLS1_PRF_SIGN },  | 
473  |  |     { PROV_NAMES_HKDF, "provider=default", ossl_kdf_keymgmt_functions, | 
474  |  |       PROV_DESCS_HKDF_SIGN },  | 
475  |  |     { PROV_NAMES_SCRYPT, "provider=default", ossl_kdf_keymgmt_functions, | 
476  |  |       PROV_DESCS_SCRYPT_SIGN },  | 
477  |  |     { PROV_NAMES_HMAC, "provider=default", ossl_mac_legacy_keymgmt_functions, | 
478  |  |       PROV_DESCS_HMAC_SIGN },  | 
479  |  |     { PROV_NAMES_SIPHASH, "provider=default", ossl_mac_legacy_keymgmt_functions, | 
480  |  |       PROV_DESCS_SIPHASH_SIGN },  | 
481  |  | #ifndef OPENSSL_NO_POLY1305  | 
482  |  |     { PROV_NAMES_POLY1305, "provider=default", ossl_mac_legacy_keymgmt_functions, | 
483  |  |       PROV_DESCS_POLY1305_SIGN },  | 
484  |  | #endif  | 
485  |  | #ifndef OPENSSL_NO_CMAC  | 
486  |  |     { PROV_NAMES_CMAC, "provider=default", ossl_cmac_legacy_keymgmt_functions, | 
487  |  |       PROV_DESCS_CMAC_SIGN },  | 
488  |  | #endif  | 
489  |  | #ifndef OPENSSL_NO_SM2  | 
490  |  |     { PROV_NAMES_SM2, "provider=default", ossl_sm2_keymgmt_functions, | 
491  |  |       PROV_DESCS_SM2 },  | 
492  |  | #endif  | 
493  |  |     { NULL, NULL, NULL } | 
494  |  | };  | 
495  |  |  | 
496  |  | static const OSSL_ALGORITHM deflt_encoder[] = { | 
497  |  | #define ENCODER_PROVIDER "default"  | 
498  |  | #include "encoders.inc"  | 
499  |  |     { NULL, NULL, NULL } | 
500  |  | #undef ENCODER_PROVIDER  | 
501  |  | };  | 
502  |  |  | 
503  |  | static const OSSL_ALGORITHM deflt_decoder[] = { | 
504  |  | #define DECODER_PROVIDER "default"  | 
505  |  | #include "decoders.inc"  | 
506  |  |     { NULL, NULL, NULL } | 
507  |  | #undef DECODER_PROVIDER  | 
508  |  | };  | 
509  |  |  | 
510  |  | static const OSSL_ALGORITHM deflt_store[] = { | 
511  |  | #define STORE(name, _fips, func_table)                           \  | 
512  |  |     { name, "provider=default,fips=" _fips, (func_table) }, | 
513  |  |  | 
514  |  | #include "stores.inc"  | 
515  |  |     { NULL, NULL, NULL } | 
516  |  | #undef STORE  | 
517  |  | };  | 
518  |  |  | 
519  |  | static const OSSL_ALGORITHM *deflt_query(void *provctx, int operation_id,  | 
520  |  |                                          int *no_cache)  | 
521  | 85  | { | 
522  | 85  |     *no_cache = 0;  | 
523  | 85  |     switch (operation_id) { | 
524  | 21  |     case OSSL_OP_DIGEST:  | 
525  | 21  |         return deflt_digests;  | 
526  | 32  |     case OSSL_OP_CIPHER:  | 
527  | 32  |         return exported_ciphers;  | 
528  | 0  |     case OSSL_OP_MAC:  | 
529  | 0  |         return deflt_macs;  | 
530  | 0  |     case OSSL_OP_KDF:  | 
531  | 0  |         return deflt_kdfs;  | 
532  | 32  |     case OSSL_OP_RAND:  | 
533  | 32  |         return deflt_rands;  | 
534  | 0  |     case OSSL_OP_KEYMGMT:  | 
535  | 0  |         return deflt_keymgmt;  | 
536  | 0  |     case OSSL_OP_KEYEXCH:  | 
537  | 0  |         return deflt_keyexch;  | 
538  | 0  |     case OSSL_OP_SIGNATURE:  | 
539  | 0  |         return deflt_signature;  | 
540  | 0  |     case OSSL_OP_ASYM_CIPHER:  | 
541  | 0  |         return deflt_asym_cipher;  | 
542  | 0  |     case OSSL_OP_KEM:  | 
543  | 0  |         return deflt_asym_kem;  | 
544  | 0  |     case OSSL_OP_ENCODER:  | 
545  | 0  |         return deflt_encoder;  | 
546  | 0  |     case OSSL_OP_DECODER:  | 
547  | 0  |         return deflt_decoder;  | 
548  | 0  |     case OSSL_OP_STORE:  | 
549  | 0  |         return deflt_store;  | 
550  | 85  |     }  | 
551  | 0  |     return NULL;  | 
552  | 85  | }  | 
553  |  |  | 
554  |  |  | 
555  |  | static void deflt_teardown(void *provctx)  | 
556  | 16  | { | 
557  | 16  |     BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));  | 
558  | 16  |     ossl_prov_ctx_free(provctx);  | 
559  | 16  | }  | 
560  |  |  | 
561  |  | /* Functions we provide to the core */  | 
562  |  | static const OSSL_DISPATCH deflt_dispatch_table[] = { | 
563  |  |     { OSSL_FUNC_PROVIDER_TEARDOWN, (void (*)(void))deflt_teardown }, | 
564  |  |     { OSSL_FUNC_PROVIDER_GETTABLE_PARAMS, (void (*)(void))deflt_gettable_params }, | 
565  |  |     { OSSL_FUNC_PROVIDER_GET_PARAMS, (void (*)(void))deflt_get_params }, | 
566  |  |     { OSSL_FUNC_PROVIDER_QUERY_OPERATION, (void (*)(void))deflt_query }, | 
567  |  |     { OSSL_FUNC_PROVIDER_GET_CAPABILITIES, | 
568  |  |       (void (*)(void))ossl_prov_get_capabilities },  | 
569  |  |     OSSL_DISPATCH_END  | 
570  |  | };  | 
571  |  |  | 
572  |  | OSSL_provider_init_fn ossl_default_provider_init;  | 
573  |  |  | 
574  |  | int ossl_default_provider_init(const OSSL_CORE_HANDLE *handle,  | 
575  |  |                                const OSSL_DISPATCH *in,  | 
576  |  |                                const OSSL_DISPATCH **out,  | 
577  |  |                                void **provctx)  | 
578  | 16  | { | 
579  | 16  |     OSSL_FUNC_core_get_libctx_fn *c_get_libctx = NULL;  | 
580  | 16  |     BIO_METHOD *corebiometh;  | 
581  |  |  | 
582  | 16  |     if (!ossl_prov_bio_from_dispatch(in)  | 
583  | 16  |             || !ossl_prov_seeding_from_dispatch(in))  | 
584  | 0  |         return 0;  | 
585  | 832  |     for (; in->function_id != 0; in++) { | 
586  | 816  |         switch (in->function_id) { | 
587  | 16  |         case OSSL_FUNC_CORE_GETTABLE_PARAMS:  | 
588  | 16  |             c_gettable_params = OSSL_FUNC_core_gettable_params(in);  | 
589  | 16  |             break;  | 
590  | 16  |         case OSSL_FUNC_CORE_GET_PARAMS:  | 
591  | 16  |             c_get_params = OSSL_FUNC_core_get_params(in);  | 
592  | 16  |             break;  | 
593  | 16  |         case OSSL_FUNC_CORE_GET_LIBCTX:  | 
594  | 16  |             c_get_libctx = OSSL_FUNC_core_get_libctx(in);  | 
595  | 16  |             break;  | 
596  | 768  |         default:  | 
597  |  |             /* Just ignore anything we don't understand */  | 
598  | 768  |             break;  | 
599  | 816  |         }  | 
600  | 816  |     }  | 
601  |  |  | 
602  | 16  |     if (c_get_libctx == NULL)  | 
603  | 0  |         return 0;  | 
604  |  |  | 
605  |  |     /*  | 
606  |  |      * We want to make sure that all calls from this provider that requires  | 
607  |  |      * a library context use the same context as the one used to call our  | 
608  |  |      * functions.  We do that by passing it along in the provider context.  | 
609  |  |      *  | 
610  |  |      * This only works for built-in providers.  Most providers should  | 
611  |  |      * create their own library context.  | 
612  |  |      */  | 
613  | 16  |     if ((*provctx = ossl_prov_ctx_new()) == NULL  | 
614  | 16  |             || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) { | 
615  | 0  |         ossl_prov_ctx_free(*provctx);  | 
616  | 0  |         *provctx = NULL;  | 
617  | 0  |         return 0;  | 
618  | 0  |     }  | 
619  | 16  |     ossl_prov_ctx_set0_libctx(*provctx,  | 
620  | 16  |                                        (OSSL_LIB_CTX *)c_get_libctx(handle));  | 
621  | 16  |     ossl_prov_ctx_set0_handle(*provctx, handle);  | 
622  | 16  |     ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);  | 
623  |  |  | 
624  | 16  |     *out = deflt_dispatch_table;  | 
625  | 16  |     ossl_prov_cache_exported_algorithms(deflt_ciphers, exported_ciphers);  | 
626  |  |  | 
627  | 16  |     return 1;  | 
628  | 16  | }  |