Richard Levitte | c41f3ae | 2019-03-17 18:06:59 +0100 | [diff] [blame] | 1 | /* |
Matt Caswell | 3c2bdd7 | 2021-04-08 13:04:41 +0100 | [diff] [blame] | 2 | * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. |
Richard Levitte | c41f3ae | 2019-03-17 18:06:59 +0100 | [diff] [blame] | 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 <openssl/core.h> |
| 11 | |
Matt Caswell | 352d482 | 2021-06-18 15:56:54 +0100 | [diff] [blame] | 12 | typedef struct { |
| 13 | char *name; |
| 14 | char *value; |
| 15 | } INFOPAIR; |
| 16 | DEFINE_STACK_OF(INFOPAIR) |
| 17 | |
Matt Caswell | b724896 | 2021-06-21 15:59:41 +0100 | [diff] [blame] | 18 | typedef struct { |
Matt Caswell | 1d74203 | 2021-06-18 12:28:40 +0100 | [diff] [blame] | 19 | char *name; |
Matt Caswell | 352d482 | 2021-06-18 15:56:54 +0100 | [diff] [blame] | 20 | char *path; |
Richard Levitte | c41f3ae | 2019-03-17 18:06:59 +0100 | [diff] [blame] | 21 | OSSL_provider_init_fn *init; |
Matt Caswell | 352d482 | 2021-06-18 15:56:54 +0100 | [diff] [blame] | 22 | STACK_OF(INFOPAIR) *parameters; |
Richard Levitte | c41f3ae | 2019-03-17 18:06:59 +0100 | [diff] [blame] | 23 | unsigned int is_fallback:1; |
Matt Caswell | b724896 | 2021-06-21 15:59:41 +0100 | [diff] [blame] | 24 | } OSSL_PROVIDER_INFO; |
Richard Levitte | c41f3ae | 2019-03-17 18:06:59 +0100 | [diff] [blame] | 25 | |
Matt Caswell | b724896 | 2021-06-21 15:59:41 +0100 | [diff] [blame] | 26 | extern const OSSL_PROVIDER_INFO ossl_predefined_providers[]; |
Matt Caswell | 352d482 | 2021-06-18 15:56:54 +0100 | [diff] [blame] | 27 | |
Matt Caswell | b724896 | 2021-06-21 15:59:41 +0100 | [diff] [blame] | 28 | void ossl_provider_info_clear(OSSL_PROVIDER_INFO *info); |
Matt Caswell | 352d482 | 2021-06-18 15:56:54 +0100 | [diff] [blame] | 29 | int ossl_provider_info_add_to_store(OSSL_LIB_CTX *libctx, |
Matt Caswell | b724896 | 2021-06-21 15:59:41 +0100 | [diff] [blame] | 30 | OSSL_PROVIDER_INFO *entry); |
| 31 | int ossl_provider_info_add_parameter(OSSL_PROVIDER_INFO *provinfo, |
Matt Caswell | 352d482 | 2021-06-18 15:56:54 +0100 | [diff] [blame] | 32 | const char *name, |
| 33 | const char *value); |