/*
 * 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('rsa_get_ctx_params',
                         (['OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST',             'oaep',   'utf8_string'],
                          ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE',                'pad',    'utf8_string'],
                          ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE',                'pad',    'int'],
                          ['OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST',             'mgf1',   'utf8_string'],
                          ['OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL',              'label',  'octet_ptr'],
                          ['OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION',      'tlsver', 'uint'],
                          ['OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION',  'negver', 'uint'],
                          ['OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION',      'imrej',  'uint'],
                          ['OSSL_ASYM_CIPHER_PARAM_FIPS_APPROVED_INDICATOR', 'ind',    'int', 'fips'],
                         )); -}

{- produce_param_decoder('rsa_set_ctx_params',
                         (['OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST',                  'oaep',    'utf8_string'],
                          ['OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS',            'oaep_pq', 'utf8_string'],
                          ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE',                     'pad',     'utf8_string'],
                          ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE',                     'pad',     'int'],
                          ['OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST',                  'mgf1',    'utf8_string'],
                          ['OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS',            'mgf1_pq', 'utf8_string'],
                          ['OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL',                   'label',   'octet_string'],
                          ['OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION',           'tlsver',  'uint'],
                          ['OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION',       'negver',  'uint'],
                          ['OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION',           'imrej',   'uint'],
                          ['OSSL_ASYM_CIPHER_PARAM_FIPS_KEY_CHECK',               'ind_k',   'int', 'fips'],
                          ['OSSL_ASYM_CIPHER_PARAM_FIPS_RSA_PKCS15_PAD_DISABLED', 'ind_pad', 'int', 'fips'],
                         )); -}
