summaryrefslogtreecommitdiff
path: root/providers/stores.inc
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-08-02 12:46:00 +0200
committerRichard Levitte <levitte@openssl.org>2020-09-03 17:48:32 +0200
commit63f187cfedd21550094b5d69a52f7f617545b209 (patch)
treeaa2b6649e267d28c516d843b5e94f376ad6b3a80 /providers/stores.inc
parent16feca71544681cabf873fecd3f860f9853bdf07 (diff)
downloadopenssl-new-63f187cfedd21550094b5d69a52f7f617545b209.tar.gz
STORE: Add a built-in 'file:' storemgmt implementation (loader)
This replaces the older 'file:' loader that is now an engine. It's still possible to use the older 'file:' loader by explicitly using the engine, and tests will remain for it as long as ENGINEs are still supported (even through deprecated). To support this storemgmt implementation, a few internal OSSL_DECODER modifications are needed: - An internal function that implements most of OSSL_DECODER_CTX_new_by_EVP_PKEY(), but operates on an already existing OSSL_DECODER_CTX instead of allocating a new one. - Allow direct creation of a OSSL_DECODER from an OSSL_ALGORITHM. It isn't attached to any provider, and is only used internally, to simply catch any DER encoded object to be passed back to the object callback with no further checking. This implementation becomes the last resort decoder, when all "normal" decodation attempts (i.e. those that are supposed to result in an OpenSSL object of some sort) have failed. Because file_store_attach() uses BIO_tell(), we must also support BIO_ctrl() as a libcrypto upcall. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12587)
Diffstat (limited to 'providers/stores.inc')
-rw-r--r--providers/stores.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/providers/stores.inc b/providers/stores.inc
new file mode 100644
index 0000000000..ecf3ca123b
--- /dev/null
+++ b/providers/stores.inc
@@ -0,0 +1,14 @@
+/*
+ * Copyright 2020 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
+ */
+
+#ifndef STORE
+# error Macro STORE undefined
+#endif
+
+STORE("file", "yes", file_store_functions)