/*
 * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
 *
 * Licensed under the Apache License 2.0 (the \"License\").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
 * in the file LICENSE in the source distribution or at
 * https://www.openssl.org/source/license.html
 */

{-
use OpenSSL::paramnames qw(produce_param_decoder);
-}

{- produce_param_decoder('ecx_imexport_types',
                         (['OSSL_PKEY_PARAM_PUB_KEY',  'pub',  'octet_string'],
                          ['OSSL_PKEY_PARAM_PRIV_KEY', 'priv', 'octet_string'],
                         )); -}

{- produce_param_decoder('ecx_get_params',
                         (['OSSL_PKEY_PARAM_BITS',                    'bits',    'int'],
                          ['OSSL_PKEY_PARAM_SECURITY_BITS',           'secbits', 'int'],
                          ['OSSL_PKEY_PARAM_MAX_SIZE',                'size',    'int'],
                          ['OSSL_PKEY_PARAM_SECURITY_CATEGORY',       'seccat',  'int'],
                          ['OSSL_PKEY_PARAM_PUB_KEY',                 'pub',     'octet_string'],
                          ['OSSL_PKEY_PARAM_PRIV_KEY',                'priv',    'octet_string'],
                          ['OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY',      'encpub',  'octet_string'],
                          ['OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR', 'ind',     'int', 'fips'],
                         )); -}

{- produce_param_decoder('ed_get_params',
                         (['OSSL_PKEY_PARAM_BITS',              'bits',    'int'],
                          ['OSSL_PKEY_PARAM_SECURITY_BITS',     'secbits', 'int'],
                          ['OSSL_PKEY_PARAM_MAX_SIZE',          'size',    'int'],
                          ['OSSL_PKEY_PARAM_SECURITY_CATEGORY', 'seccat',  'int'],
                          ['OSSL_PKEY_PARAM_PUB_KEY',           'pub',     'octet_string'],
                          ['OSSL_PKEY_PARAM_PRIV_KEY',          'priv',    'octet_string'],
                          ['OSSL_PKEY_PARAM_MANDATORY_DIGEST',  'digest',  'utf8_string'],
                         )); -}

{- produce_param_decoder('ecx_set_params',
                         (['OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY',  'pub',   'octet_string'],
                          ['OSSL_PKEY_PARAM_PROPERTIES',          'propq', 'utf8_string'],
                         )); -}

{- produce_param_decoder('ecx_gen_set_params',
                         (['OSSL_PKEY_PARAM_GROUP_NAME', 'group',    'utf8_string'],
                          ['OSSL_KDF_PARAM_PROPERTIES',  'kdfpropq', 'utf8_string'],
                          ['OSSL_PKEY_PARAM_DHKEM_IKM',  'ikm',      'octet_string'],
                         )); -}
