summaryrefslogtreecommitdiffstats
path: root/providers/baseprov.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-07-27 14:47:59 +1000
committerPauli <paul.dale@oracle.com>2020-07-30 20:15:59 +1000
commita3f15e237c0325718f488ebf9a242c031f4f864e (patch)
treee7967fa597f7e7ba61ea7bd5d5de7541bcf709bf /providers/baseprov.c
parentdfc0857d8191d43be320f4ba472b7c782248a35d (diff)
deserialisation: add deserialisation to the base provider
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12104)
Diffstat (limited to 'providers/baseprov.c')
-rw-r--r--providers/baseprov.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/providers/baseprov.c b/providers/baseprov.c
index d40535bafa..917bf680d4 100644
--- a/providers/baseprov.c
+++ b/providers/baseprov.c
@@ -75,11 +75,28 @@ static const OSSL_ALGORITHM base_serializer[] = {
};
#undef SER
+static const OSSL_ALGORITHM base_deserializer[] = {
+#define DESER(name, fips, input, func_table) \
+ { name, \
+ "provider=base,fips=" fips ",input=" input, \
+ (func_table) }
+
+#include "deserializers.inc"
+ { NULL, NULL, NULL }
+};
+#undef DESER
+
static const OSSL_ALGORITHM *base_query(void *provctx, int operation_id,
int *no_cache)
{
*no_cache = 0;
- return operation_id == OSSL_OP_SERIALIZER ? base_serializer : NULL;
+ switch (operation_id) {
+ case OSSL_OP_SERIALIZER:
+ return base_serializer;
+ case OSSL_OP_DESERIALIZER:
+ return base_deserializer;
+ }
+ return NULL;
}
static void base_teardown(void *provctx)