summaryrefslogtreecommitdiffstats
path: root/crypto/provider_local.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-03-17 18:06:59 +0100
committerRichard Levitte <levitte@openssl.org>2019-03-19 14:06:58 +0100
commitc41f3ae0d92a87b903a9ed585622adae06791676 (patch)
tree8e60899b2cb0a613068c50686abf147076ba6f8c /crypto/provider_local.h
parente55008a9f2ae299374dcf868b660389e84dd2e0b (diff)
Replumbing: Add a mechanism to pre-populate the provider store
OpenSSL will come with a set of well known providers, some of which need to be accessible from the start. These are typically built in providers, or providers that will work as fallbacks. We do this when creating a new provider store, which means that this will happen in every library context, regardless of if it's the global default one, or an explicitely created one. We keep the data about the known providers we want to make accessible this way in crypto/provider_predefined.h, which may become generated. For now, though, we make it simple and edited manually. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8480)
Diffstat (limited to 'crypto/provider_local.h')
-rw-r--r--crypto/provider_local.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/crypto/provider_local.h b/crypto/provider_local.h
new file mode 100644
index 0000000000..e4c649a736
--- /dev/null
+++ b/crypto/provider_local.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+#include <openssl/core.h>
+
+struct predefined_providers_st {
+ const char *name;
+ OSSL_provider_init_fn *init;
+ unsigned int is_fallback:1;
+};
+
+extern const struct predefined_providers_st predefined_providers[];