/*
 * 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
 */



/* Machine generated by util/perl/OpenSSL/paramnames.pm */
#ifndef ecdsa_get_ctx_params_list
static const OSSL_PARAM ecdsa_get_ctx_params_list[] = {
    OSSL_PARAM_octet_string(OSSL_SIGNATURE_PARAM_ALGORITHM_ID, NULL, 0),
    OSSL_PARAM_size_t(OSSL_SIGNATURE_PARAM_DIGEST_SIZE, NULL),
    OSSL_PARAM_utf8_string(OSSL_SIGNATURE_PARAM_DIGEST, NULL, 0),
    OSSL_PARAM_uint(OSSL_SIGNATURE_PARAM_NONCE_TYPE, NULL),
# if defined(FIPS_MODULE)
    OSSL_PARAM_uint(OSSL_SIGNATURE_PARAM_FIPS_VERIFY_MESSAGE, NULL),
# endif
# if defined(FIPS_MODULE)
    OSSL_PARAM_int(OSSL_SIGNATURE_PARAM_FIPS_APPROVED_INDICATOR, NULL),
# endif
    OSSL_PARAM_END
};
#endif

#ifndef ecdsa_get_ctx_params_st
struct ecdsa_get_ctx_params_st {
    OSSL_PARAM *algid;
    OSSL_PARAM *digest;
# if defined(FIPS_MODULE)
    OSSL_PARAM *ind;
# endif
    OSSL_PARAM *nonce;
    OSSL_PARAM *size;
# if defined(FIPS_MODULE)
    OSSL_PARAM *verify;
# endif
};
#endif

#ifndef ecdsa_get_ctx_params_decoder
static int ecdsa_get_ctx_params_decoder
    (const OSSL_PARAM *p, struct ecdsa_get_ctx_params_st *r)
{
    const char *s;

    memset(r, 0, sizeof(*r));
    if (p != NULL)
        for (; (s = p->key) != NULL; p++)
            switch(s[0]) {
            default:
                break;
            case 'a':
                if (ossl_likely(strcmp("lgorithm-id", s + 1) == 0)) {
                    /* OSSL_SIGNATURE_PARAM_ALGORITHM_ID */
                    if (ossl_unlikely(r->algid != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->algid = (OSSL_PARAM *)p;
                }
                break;
            case 'd':
                switch(s[1]) {
                default:
                    break;
                case 'i':
                    switch(s[2]) {
                    default:
                        break;
                    case 'g':
                        switch(s[3]) {
                        default:
                            break;
                        case 'e':
                            switch(s[4]) {
                            default:
                                break;
                            case 's':
                                switch(s[5]) {
                                default:
                                    break;
                                case 't':
                                    switch(s[6]) {
                                    default:
                                        break;
                                    case '-':
                                        if (ossl_likely(strcmp("size", s + 7) == 0)) {
                                            /* OSSL_SIGNATURE_PARAM_DIGEST_SIZE */
                                            if (ossl_unlikely(r->size != NULL)) {
                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                               "param %s is repeated", s);
                                                return 0;
                                            }
                                            r->size = (OSSL_PARAM *)p;
                                        }
                                        break;
                                    case '\0':
                                        if (ossl_unlikely(r->digest != NULL)) {
                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                           "param %s is repeated", s);
                                            return 0;
                                        }
                                        r->digest = (OSSL_PARAM *)p;
                                    }
                                }
                            }
                        }
                    }
                }
                break;
            case 'f':
# if defined(FIPS_MODULE)
                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
                    /* OSSL_SIGNATURE_PARAM_FIPS_APPROVED_INDICATOR */
                    if (ossl_unlikely(r->ind != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->ind = (OSSL_PARAM *)p;
                }
# endif
                break;
            case 'n':
                if (ossl_likely(strcmp("once-type", s + 1) == 0)) {
                    /* OSSL_SIGNATURE_PARAM_NONCE_TYPE */
                    if (ossl_unlikely(r->nonce != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->nonce = (OSSL_PARAM *)p;
                }
                break;
            case 'v':
# if defined(FIPS_MODULE)
                if (ossl_likely(strcmp("erify-message", s + 1) == 0)) {
                    /* OSSL_SIGNATURE_PARAM_FIPS_VERIFY_MESSAGE */
                    if (ossl_unlikely(r->verify != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->verify = (OSSL_PARAM *)p;
                }
# endif
                break;
            }
    return 1;
}
#endif
/* End of machine generated */

/* Machine generated by util/perl/OpenSSL/paramnames.pm */
#ifndef ecdsa_set_ctx_params_list
static const OSSL_PARAM ecdsa_set_ctx_params_list[] = {
    OSSL_PARAM_utf8_string(OSSL_SIGNATURE_PARAM_DIGEST, NULL, 0),
    OSSL_PARAM_utf8_string(OSSL_SIGNATURE_PARAM_PROPERTIES, NULL, 0),
    OSSL_PARAM_size_t(OSSL_SIGNATURE_PARAM_DIGEST_SIZE, NULL),
# if !defined(OPENSSL_NO_ACVP_TESTS)
    OSSL_PARAM_uint(OSSL_SIGNATURE_PARAM_KAT, NULL),
# endif
    OSSL_PARAM_uint(OSSL_SIGNATURE_PARAM_NONCE_TYPE, NULL),
# if defined(FIPS_MODULE)
    OSSL_PARAM_int(OSSL_SIGNATURE_PARAM_FIPS_KEY_CHECK, NULL),
# endif
# if defined(FIPS_MODULE)
    OSSL_PARAM_int(OSSL_SIGNATURE_PARAM_FIPS_DIGEST_CHECK, NULL),
# endif
    OSSL_PARAM_END
};
#endif

#ifndef ecdsa_set_ctx_params_st
struct ecdsa_set_ctx_params_st {
    OSSL_PARAM *digest;
# if defined(FIPS_MODULE)
    OSSL_PARAM *ind_d;
# endif
# if defined(FIPS_MODULE)
    OSSL_PARAM *ind_k;
# endif
# if !defined(OPENSSL_NO_ACVP_TESTS)
    OSSL_PARAM *kat;
# endif
    OSSL_PARAM *nonce;
    OSSL_PARAM *propq;
    OSSL_PARAM *size;
};
#endif

#ifndef ecdsa_set_ctx_params_decoder
static int ecdsa_set_ctx_params_decoder
    (const OSSL_PARAM *p, struct ecdsa_set_ctx_params_st *r)
{
    const char *s;

    memset(r, 0, sizeof(*r));
    if (p != NULL)
        for (; (s = p->key) != NULL; p++)
            switch(s[0]) {
            default:
                break;
            case 'd':
                switch(s[1]) {
                default:
                    break;
                case 'i':
                    switch(s[2]) {
                    default:
                        break;
                    case 'g':
                        switch(s[3]) {
                        default:
                            break;
                        case 'e':
                            switch(s[4]) {
                            default:
                                break;
                            case 's':
                                switch(s[5]) {
                                default:
                                    break;
                                case 't':
                                    switch(s[6]) {
                                    default:
                                        break;
                                    case '-':
                                        switch(s[7]) {
                                        default:
                                            break;
                                        case 'c':
# if defined(FIPS_MODULE)
                                            if (ossl_likely(strcmp("heck", s + 8) == 0)) {
                                                /* OSSL_SIGNATURE_PARAM_FIPS_DIGEST_CHECK */
                                                if (ossl_unlikely(r->ind_d != NULL)) {
                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                   "param %s is repeated", s);
                                                    return 0;
                                                }
                                                r->ind_d = (OSSL_PARAM *)p;
                                            }
# endif
                                            break;
                                        case 's':
                                            if (ossl_likely(strcmp("ize", s + 8) == 0)) {
                                                /* OSSL_SIGNATURE_PARAM_DIGEST_SIZE */
                                                if (ossl_unlikely(r->size != NULL)) {
                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                   "param %s is repeated", s);
                                                    return 0;
                                                }
                                                r->size = (OSSL_PARAM *)p;
                                            }
                                        }
                                        break;
                                    case '\0':
                                        if (ossl_unlikely(r->digest != NULL)) {
                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                           "param %s is repeated", s);
                                            return 0;
                                        }
                                        r->digest = (OSSL_PARAM *)p;
                                    }
                                }
                            }
                        }
                    }
                }
                break;
            case 'k':
                switch(s[1]) {
                default:
                    break;
                case 'a':
# if !defined(OPENSSL_NO_ACVP_TESTS)
                    if (ossl_likely(strcmp("t", s + 2) == 0)) {
                        /* OSSL_SIGNATURE_PARAM_KAT */
                        if (ossl_unlikely(r->kat != NULL)) {
                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                           "param %s is repeated", s);
                            return 0;
                        }
                        r->kat = (OSSL_PARAM *)p;
                    }
# endif
                    break;
                case 'e':
# if defined(FIPS_MODULE)
                    if (ossl_likely(strcmp("y-check", s + 2) == 0)) {
                        /* OSSL_SIGNATURE_PARAM_FIPS_KEY_CHECK */
                        if (ossl_unlikely(r->ind_k != NULL)) {
                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                           "param %s is repeated", s);
                            return 0;
                        }
                        r->ind_k = (OSSL_PARAM *)p;
                    }
# endif
                    break;
                }
                break;
            case 'n':
                if (ossl_likely(strcmp("once-type", s + 1) == 0)) {
                    /* OSSL_SIGNATURE_PARAM_NONCE_TYPE */
                    if (ossl_unlikely(r->nonce != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->nonce = (OSSL_PARAM *)p;
                }
                break;
            case 'p':
                if (ossl_likely(strcmp("roperties", s + 1) == 0)) {
                    /* OSSL_SIGNATURE_PARAM_PROPERTIES */
                    if (ossl_unlikely(r->propq != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->propq = (OSSL_PARAM *)p;
                }
            }
    return 1;
}
#endif
/* End of machine generated */

/* Machine generated by util/perl/OpenSSL/paramnames.pm */
#ifndef ecdsa_sigalg_set_ctx_params_list
static const OSSL_PARAM ecdsa_sigalg_set_ctx_params_list[] = {
    OSSL_PARAM_octet_string(OSSL_SIGNATURE_PARAM_SIGNATURE, NULL, 0),
# if !defined(OPENSSL_NO_ACVP_TESTS)
    OSSL_PARAM_uint(OSSL_SIGNATURE_PARAM_KAT, NULL),
# endif
    OSSL_PARAM_uint(OSSL_SIGNATURE_PARAM_NONCE_TYPE, NULL),
# if defined(FIPS_MODULE)
    OSSL_PARAM_int(OSSL_SIGNATURE_PARAM_FIPS_KEY_CHECK, NULL),
# endif
# if defined(FIPS_MODULE)
    OSSL_PARAM_int(OSSL_SIGNATURE_PARAM_FIPS_DIGEST_CHECK, NULL),
# endif
    OSSL_PARAM_END
};
#endif

#ifndef ecdsa_sigalg_set_ctx_params_st
struct ecdsa_sigalg_set_ctx_params_st {
# if defined(FIPS_MODULE)
    OSSL_PARAM *ind_d;
# endif
# if defined(FIPS_MODULE)
    OSSL_PARAM *ind_k;
# endif
# if !defined(OPENSSL_NO_ACVP_TESTS)
    OSSL_PARAM *kat;
# endif
    OSSL_PARAM *nonce;
    OSSL_PARAM *sig;
};
#endif

#ifndef ecdsa_sigalg_set_ctx_params_decoder
static int ecdsa_sigalg_set_ctx_params_decoder
    (const OSSL_PARAM *p, struct ecdsa_sigalg_set_ctx_params_st *r)
{
    const char *s;

    memset(r, 0, sizeof(*r));
    if (p != NULL)
        for (; (s = p->key) != NULL; p++)
            switch(s[0]) {
            default:
                break;
            case 'd':
# if defined(FIPS_MODULE)
                if (ossl_likely(strcmp("igest-check", s + 1) == 0)) {
                    /* OSSL_SIGNATURE_PARAM_FIPS_DIGEST_CHECK */
                    if (ossl_unlikely(r->ind_d != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->ind_d = (OSSL_PARAM *)p;
                }
# endif
                break;
            case 'k':
                switch(s[1]) {
                default:
                    break;
                case 'a':
# if !defined(OPENSSL_NO_ACVP_TESTS)
                    if (ossl_likely(strcmp("t", s + 2) == 0)) {
                        /* OSSL_SIGNATURE_PARAM_KAT */
                        if (ossl_unlikely(r->kat != NULL)) {
                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                           "param %s is repeated", s);
                            return 0;
                        }
                        r->kat = (OSSL_PARAM *)p;
                    }
# endif
                    break;
                case 'e':
# if defined(FIPS_MODULE)
                    if (ossl_likely(strcmp("y-check", s + 2) == 0)) {
                        /* OSSL_SIGNATURE_PARAM_FIPS_KEY_CHECK */
                        if (ossl_unlikely(r->ind_k != NULL)) {
                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                           "param %s is repeated", s);
                            return 0;
                        }
                        r->ind_k = (OSSL_PARAM *)p;
                    }
# endif
                    break;
                }
                break;
            case 'n':
                if (ossl_likely(strcmp("once-type", s + 1) == 0)) {
                    /* OSSL_SIGNATURE_PARAM_NONCE_TYPE */
                    if (ossl_unlikely(r->nonce != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->nonce = (OSSL_PARAM *)p;
                }
                break;
            case 's':
                if (ossl_likely(strcmp("ignature", s + 1) == 0)) {
                    /* OSSL_SIGNATURE_PARAM_SIGNATURE */
                    if (ossl_unlikely(r->sig != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->sig = (OSSL_PARAM *)p;
                }
            }
    return 1;
}
#endif
/* End of machine generated */
