]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - providers/baseprov.c
Rename OSSL_SERIALIZER / OSSL_DESERIALIZER to OSSL_ENCODE / OSSL_DECODE
[thirdparty/openssl.git] / providers / baseprov.c
index d40535bafaf79f3f740ddac0993e88b48a7acf5a..eb0e4afbd33c75acc419371657be8bdc5b67c3e1 100644 (file)
@@ -64,22 +64,39 @@ static int base_get_params(void *provctx, OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_ALGORITHM base_serializer[] = {
-#define SER(name, fips, format, type, func_table)                           \
+static const OSSL_ALGORITHM base_encoder[] = {
+#define ENCODER(name, fips, format, type, func_table)                           \
     { name,                                                                 \
       "provider=base,fips=" fips ",format=" format ",type=" type,           \
       (func_table) }
 
-#include "serializers.inc"
+#include "encoders.inc"
     { NULL, NULL, NULL }
 };
-#undef SER
+#undef ENCODER
+
+static const OSSL_ALGORITHM base_decoder[] = {
+#define DECODER(name, fips, input, func_table)                                \
+    { name,                                                                 \
+      "provider=base,fips=" fips ",input=" input,                           \
+      (func_table) }
+
+#include "decoders.inc"
+    { NULL, NULL, NULL }
+};
+#undef DECODER
 
 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_ENCODER:
+        return base_encoder;
+    case OSSL_OP_DECODER:
+        return base_decoder;
+    }
+    return NULL;
 }
 
 static void base_teardown(void *provctx)