summaryrefslogtreecommitdiffstats
path: root/providers/implementations/encode_decode/encode_key2text.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-06-02 06:32:00 +0200
committerPauli <pauli@openssl.org>2021-06-05 20:30:47 +1000
commit73c02a6201d08afb4ad5055fc3906e1d4504b578 (patch)
treed9fce0ced39e25691a79fa14ac2440f07e935d48 /providers/implementations/encode_decode/encode_key2text.c
parent6462a4f0508e451f0411e88b2f465f27f1db6cc7 (diff)
ENCODER: Drop OSSL_ENCODER_PARAM_INPUT_TYPE
This was a poor substitute for using the name of the decoder implementation, and since there is functionality to get the latter now, this parameter can be dropped. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15570)
Diffstat (limited to 'providers/implementations/encode_decode/encode_key2text.c')
-rw-r--r--providers/implementations/encode_decode/encode_key2text.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/providers/implementations/encode_decode/encode_key2text.c b/providers/implementations/encode_decode/encode_key2text.c
index 9bdbe52656..6adbacaca6 100644
--- a/providers/implementations/encode_decode/encode_key2text.c
+++ b/providers/implementations/encode_decode/encode_key2text.c
@@ -805,14 +805,10 @@ static const OSSL_PARAM *key2text_gettable_params(void *provctx)
return gettables;
}
-static int key2text_get_params(OSSL_PARAM params[], const char *input_type)
+static int key2text_get_params(OSSL_PARAM params[])
{
OSSL_PARAM *p;
- p = OSSL_PARAM_locate(params, OSSL_ENCODER_PARAM_INPUT_TYPE);
- if (p != NULL && !OSSL_PARAM_set_utf8_ptr(p, input_type))
- return 0;
-
p = OSSL_PARAM_locate(params, OSSL_ENCODER_PARAM_OUTPUT_TYPE);
if (p != NULL && !OSSL_PARAM_set_utf8_ptr(p, "TEXT"))
return 0;
@@ -847,10 +843,6 @@ static int key2text_encode(void *vctx, const void *key, int selection,
impl##2text_free_object; \
static OSSL_FUNC_encoder_encode_fn impl##2text_encode; \
\
- static int impl##2text_get_params(OSSL_PARAM params[]) \
- { \
- return key2text_get_params(params, impl##_input_type); \
- } \
static void *impl##2text_import_object(void *ctx, int selection, \
const OSSL_PARAM params[]) \
{ \
@@ -884,7 +876,7 @@ static int key2text_encode(void *vctx, const void *key, int selection,
{ OSSL_FUNC_ENCODER_GETTABLE_PARAMS, \
(void (*)(void))key2text_gettable_params }, \
{ OSSL_FUNC_ENCODER_GET_PARAMS, \
- (void (*)(void))impl##2text_get_params }, \
+ (void (*)(void))key2text_get_params }, \
{ OSSL_FUNC_ENCODER_IMPORT_OBJECT, \
(void (*)(void))impl##2text_import_object }, \
{ OSSL_FUNC_ENCODER_FREE_OBJECT, \