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)