diff options
Diffstat (limited to 'providers/implementations/encode_decode')
4 files changed, 0 insertions, 132 deletions
diff --git a/providers/implementations/encode_decode/decode_der2key.c b/providers/implementations/encode_decode/decode_der2key.c index b3fd87ca05..22ee075b19 100644 --- a/providers/implementations/encode_decode/decode_der2key.c +++ b/providers/implementations/encode_decode/decode_der2key.c @@ -177,39 +177,6 @@ static void der2key_freectx(void *vctx) OPENSSL_free(ctx); } -static const OSSL_PARAM * -der2key_gettable_params(void *provctx, const struct keytype_desc_st *desc) -{ - static const OSSL_PARAM gettables[] = { - { OSSL_DECODER_PARAM_INPUT_TYPE, OSSL_PARAM_UTF8_PTR, NULL, 0, 0 }, - OSSL_PARAM_END, - }; - static const OSSL_PARAM gettables_w_structure[] = { - { OSSL_DECODER_PARAM_INPUT_TYPE, OSSL_PARAM_UTF8_PTR, NULL, 0, 0 }, - { OSSL_DECODER_PARAM_INPUT_STRUCTURE, OSSL_PARAM_UTF8_PTR, NULL, 0, 0 }, - OSSL_PARAM_END, - }; - - return desc->structure_name != NULL ? gettables_w_structure : gettables; -} - -static int der2key_get_params(OSSL_PARAM params[], - const struct keytype_desc_st *desc) -{ - OSSL_PARAM *p; - - p = OSSL_PARAM_locate(params, OSSL_DECODER_PARAM_INPUT_TYPE); - if (p != NULL && !OSSL_PARAM_set_utf8_ptr(p, "DER")) - return 0; - if (desc->structure_name != NULL) { - p = OSSL_PARAM_locate(params, OSSL_DECODER_PARAM_INPUT_STRUCTURE); - if (p != NULL && !OSSL_PARAM_set_utf8_ptr(p, desc->structure_name)) - return 0; - } - - return 1; -} - static int der2key_check_selection(int selection, const struct keytype_desc_st *desc) { @@ -791,25 +758,11 @@ static void rsa_adjust(void *key, struct der2key_ctx_st *ctx) DO_##kind(keytype) }; \ \ static OSSL_FUNC_decoder_newctx_fn kind##_der2##keytype##_newctx; \ - static OSSL_FUNC_decoder_gettable_params_fn \ - kind##_der2##keytype##_gettable_params; \ - static OSSL_FUNC_decoder_get_params_fn \ - kind##_der2##keytype##_get_params; \ \ static void *kind##_der2##keytype##_newctx(void *provctx) \ { \ return der2key_newctx(provctx, &kind##_##keytype##_desc); \ } \ - static const OSSL_PARAM * \ - kind##_der2##keytype##_gettable_params(void *provctx) \ - { \ - return \ - der2key_gettable_params(provctx, &kind##_##keytype##_desc); \ - } \ - static int kind##_der2##keytype##_get_params(OSSL_PARAM params[]) \ - { \ - return der2key_get_params(params, &kind##_##keytype##_desc); \ - } \ static int kind##_der2##keytype##_does_selection(void *provctx, \ int selection) \ { \ @@ -822,10 +775,6 @@ static void rsa_adjust(void *key, struct der2key_ctx_st *ctx) (void (*)(void))kind##_der2##keytype##_newctx }, \ { OSSL_FUNC_DECODER_FREECTX, \ (void (*)(void))der2key_freectx }, \ - { OSSL_FUNC_DECODER_GETTABLE_PARAMS, \ - (void (*)(void))kind##_der2##keytype##_gettable_params }, \ - { OSSL_FUNC_DECODER_GET_PARAMS, \ - (void (*)(void))kind##_der2##keytype##_get_params }, \ { OSSL_FUNC_DECODER_DOES_SELECTION, \ (void (*)(void))kind##_der2##keytype##_does_selection }, \ { OSSL_FUNC_DECODER_DECODE, \ diff --git a/providers/implementations/encode_decode/decode_msblob2key.c b/providers/implementations/encode_decode/decode_msblob2key.c index 84b259591b..15dc8b05a7 100644 --- a/providers/implementations/encode_decode/decode_msblob2key.c +++ b/providers/implementations/encode_decode/decode_msblob2key.c @@ -47,8 +47,6 @@ struct keytype_desc_st { }; static OSSL_FUNC_decoder_freectx_fn msblob2key_freectx; -static OSSL_FUNC_decoder_gettable_params_fn msblob2key_gettable_params; -static OSSL_FUNC_decoder_get_params_fn msblob2key_get_params; static OSSL_FUNC_decoder_decode_fn msblob2key_decode; static OSSL_FUNC_decoder_export_object_fn msblob2key_export_object; @@ -79,27 +77,6 @@ static void msblob2key_freectx(void *vctx) OPENSSL_free(ctx); } -static const OSSL_PARAM *msblob2key_gettable_params(ossl_unused void *provctx) -{ - static const OSSL_PARAM gettables[] = { - { OSSL_DECODER_PARAM_INPUT_TYPE, OSSL_PARAM_UTF8_PTR, NULL, 0, 0 }, - OSSL_PARAM_END, - }; - - return gettables; -} - -static int msblob2key_get_params(OSSL_PARAM params[]) -{ - OSSL_PARAM *p; - - p = OSSL_PARAM_locate(params, OSSL_DECODER_PARAM_INPUT_TYPE); - if (p != NULL && !OSSL_PARAM_set_utf8_ptr(p, "MSBLOB")) - return 0; - - return 1; -} - static int msblob2key_decode(void *vctx, OSSL_CORE_BIO *cin, int selection, OSSL_CALLBACK *data_cb, void *data_cbarg, OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg) @@ -278,10 +255,6 @@ static void rsa_adjust(void *key, struct msblob2key_ctx_st *ctx) (void (*)(void))msblob2##keytype##_newctx }, \ { OSSL_FUNC_DECODER_FREECTX, \ (void (*)(void))msblob2key_freectx }, \ - { OSSL_FUNC_DECODER_GETTABLE_PARAMS, \ - (void (*)(void))msblob2key_gettable_params }, \ - { OSSL_FUNC_DECODER_GET_PARAMS, \ - (void (*)(void))msblob2key_get_params }, \ { OSSL_FUNC_DECODER_DECODE, \ (void (*)(void))msblob2key_decode }, \ { OSSL_FUNC_DECODER_EXPORT_OBJECT, \ diff --git a/providers/implementations/encode_decode/decode_pem2der.c b/providers/implementations/encode_decode/decode_pem2der.c index 4249ce9cc7..318efcc6af 100644 --- a/providers/implementations/encode_decode/decode_pem2der.c +++ b/providers/implementations/encode_decode/decode_pem2der.c @@ -41,8 +41,6 @@ static int read_pem(PROV_CTX *provctx, OSSL_CORE_BIO *cin, static OSSL_FUNC_decoder_newctx_fn pem2der_newctx; static OSSL_FUNC_decoder_freectx_fn pem2der_freectx; -static OSSL_FUNC_decoder_gettable_params_fn pem2der_gettable_params; -static OSSL_FUNC_decoder_get_params_fn pem2der_get_params; static OSSL_FUNC_decoder_decode_fn pem2der_decode; /* @@ -68,27 +66,6 @@ static void pem2der_freectx(void *vctx) OPENSSL_free(ctx); } -static const OSSL_PARAM *pem2der_gettable_params(void *provctx) -{ - static const OSSL_PARAM gettables[] = { - { OSSL_DECODER_PARAM_INPUT_TYPE, OSSL_PARAM_UTF8_PTR, NULL, 0, 0 }, - OSSL_PARAM_END, - }; - - return gettables; -} - -static int pem2der_get_params(OSSL_PARAM params[]) -{ - OSSL_PARAM *p; - - p = OSSL_PARAM_locate(params, OSSL_DECODER_PARAM_INPUT_TYPE); - if (p != NULL && !OSSL_PARAM_set_utf8_ptr(p, "PEM")) - return 0; - - return 1; -} - /* pem_password_cb compatible function */ struct pem2der_pass_data_st { OSSL_PASSPHRASE_CALLBACK *cb; @@ -262,10 +239,6 @@ static int pem2der_decode(void *vctx, OSSL_CORE_BIO *cin, int selection, const OSSL_DISPATCH ossl_pem_to_der_decoder_functions[] = { { OSSL_FUNC_DECODER_NEWCTX, (void (*)(void))pem2der_newctx }, { OSSL_FUNC_DECODER_FREECTX, (void (*)(void))pem2der_freectx }, - { OSSL_FUNC_DECODER_GETTABLE_PARAMS, - (void (*)(void))pem2der_gettable_params }, - { OSSL_FUNC_DECODER_GET_PARAMS, - (void (*)(void))pem2der_get_params }, { OSSL_FUNC_DECODER_DECODE, (void (*)(void))pem2der_decode }, { 0, NULL } }; diff --git a/providers/implementations/encode_decode/decode_pvk2key.c b/providers/implementations/encode_decode/decode_pvk2key.c index b69b2416a5..5c26bfb908 100644 --- a/providers/implementations/encode_decode/decode_pvk2key.c +++ b/providers/implementations/encode_decode/decode_pvk2key.c @@ -47,8 +47,6 @@ struct keytype_desc_st { }; static OSSL_FUNC_decoder_freectx_fn pvk2key_freectx; -static OSSL_FUNC_decoder_gettable_params_fn pvk2key_gettable_params; -static OSSL_FUNC_decoder_get_params_fn pvk2key_get_params; static OSSL_FUNC_decoder_decode_fn pvk2key_decode; static OSSL_FUNC_decoder_export_object_fn pvk2key_export_object; @@ -79,27 +77,6 @@ static void pvk2key_freectx(void *vctx) OPENSSL_free(ctx); } -static const OSSL_PARAM *pvk2key_gettable_params(ossl_unused void *provctx) -{ - static const OSSL_PARAM gettables[] = { - { OSSL_DECODER_PARAM_INPUT_TYPE, OSSL_PARAM_UTF8_PTR, NULL, 0, 0 }, - OSSL_PARAM_END, - }; - - return gettables; -} - -static int pvk2key_get_params(OSSL_PARAM params[]) -{ - OSSL_PARAM *p; - - p = OSSL_PARAM_locate(params, OSSL_DECODER_PARAM_INPUT_TYPE); - if (p != NULL && !OSSL_PARAM_set_utf8_ptr(p, "PVK")) - return 0; - - return 1; -} - static int pvk2key_decode(void *vctx, OSSL_CORE_BIO *cin, int selection, OSSL_CALLBACK *data_cb, void *data_cbarg, OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg) @@ -243,10 +220,6 @@ static void rsa_adjust(void *key, struct pvk2key_ctx_st *ctx) (void (*)(void))pvk2##keytype##_newctx }, \ { OSSL_FUNC_DECODER_FREECTX, \ (void (*)(void))pvk2key_freectx }, \ - { OSSL_FUNC_DECODER_GETTABLE_PARAMS, \ - (void (*)(void))pvk2key_gettable_params }, \ - { OSSL_FUNC_DECODER_GET_PARAMS, \ - (void (*)(void))pvk2key_get_params }, \ { OSSL_FUNC_DECODER_DECODE, \ (void (*)(void))pvk2key_decode }, \ { OSSL_FUNC_DECODER_EXPORT_OBJECT, \ |