/*
 * 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 aes_cbc_hmac_sha_set_ctx_params_list
static const OSSL_PARAM aes_cbc_hmac_sha_set_ctx_params_list[] = {
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT, NULL),
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD, NULL),
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM_uint(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE, NULL),
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC, NULL, 0),
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN, NULL, 0),
# endif
    OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_MAC_KEY, NULL, 0),
    OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_TLS1_AAD, NULL, 0),
    OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_KEYLEN, NULL),
    OSSL_PARAM_uint(OSSL_CIPHER_PARAM_TLS_VERSION, NULL),
    OSSL_PARAM_END
};
#endif

#ifndef aes_cbc_hmac_sha_set_ctx_params_st
struct aes_cbc_hmac_sha_set_ctx_params_st {
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM *enc;
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM *enc_in;
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM *ileave;
# endif
    OSSL_PARAM *key;
    OSSL_PARAM *keylen;
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM *maxfrag;
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM *mb_aad;
# endif
    OSSL_PARAM *tlsaad;
    OSSL_PARAM *tlsver;
};
#endif

#ifndef aes_cbc_hmac_sha_set_ctx_params_decoder
static int aes_cbc_hmac_sha_set_ctx_params_decoder
    (const OSSL_PARAM *p, struct aes_cbc_hmac_sha_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 'k':
                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
                    /* OSSL_CIPHER_PARAM_KEYLEN */
                    if (ossl_unlikely(r->keylen != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->keylen = (OSSL_PARAM *)p;
                }
                break;
            case 'm':
                if (ossl_likely(strcmp("ackey", s + 1) == 0)) {
                    /* OSSL_CIPHER_PARAM_AEAD_MAC_KEY */
                    if (ossl_unlikely(r->key != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->key = (OSSL_PARAM *)p;
                }
                break;
            case 't':
                switch(s[1]) {
                default:
                    break;
                case 'l':
                    switch(s[2]) {
                    default:
                        break;
                    case 's':
                        switch(s[3]) {
                        default:
                            break;
                        case '-':
                            if (ossl_likely(strcmp("version", s + 4) == 0)) {
                                /* OSSL_CIPHER_PARAM_TLS_VERSION */
                                if (ossl_unlikely(r->tlsver != NULL)) {
                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                   "param %s is repeated", s);
                                    return 0;
                                }
                                r->tlsver = (OSSL_PARAM *)p;
                            }
                            break;
                        case '1':
                            switch(s[4]) {
                            default:
                                break;
                            case 'm':
                                switch(s[5]) {
                                default:
                                    break;
                                case 'u':
                                    switch(s[6]) {
                                    default:
                                        break;
                                    case 'l':
                                        switch(s[7]) {
                                        default:
                                            break;
                                        case 't':
                                            switch(s[8]) {
                                            default:
                                                break;
                                            case 'i':
                                                switch(s[9]) {
                                                default:
                                                    break;
                                                case '_':
                                                    switch(s[10]) {
                                                    default:
                                                        break;
                                                    case 'a':
# if !defined(OPENSSL_NO_MULTIBLOCK)
                                                        if (ossl_likely(strcmp("ad", s + 11) == 0)) {
                                                            /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD */
                                                            if (ossl_unlikely(r->mb_aad != NULL)) {
                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                               "param %s is repeated", s);
                                                                return 0;
                                                            }
                                                            r->mb_aad = (OSSL_PARAM *)p;
                                                        }
# endif
                                                        break;
                                                    case 'e':
                                                        switch(s[11]) {
                                                        default:
                                                            break;
                                                        case 'n':
                                                            switch(s[12]) {
                                                            default:
                                                                break;
                                                            case 'c':
                                                                switch(s[13]) {
                                                                default:
                                                                    break;
                                                                case 'i':
# if !defined(OPENSSL_NO_MULTIBLOCK)
                                                                    if (ossl_likely(strcmp("n", s + 14) == 0)) {
                                                                        /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN */
                                                                        if (ossl_unlikely(r->enc_in != NULL)) {
                                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                                           "param %s is repeated", s);
                                                                            return 0;
                                                                        }
                                                                        r->enc_in = (OSSL_PARAM *)p;
                                                                    }
# endif
                                                                    break;
                                                                case '\0':
# if !defined(OPENSSL_NO_MULTIBLOCK)
                                                                    if (ossl_unlikely(r->enc != NULL)) {
                                                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                                       "param %s is repeated", s);
                                                                        return 0;
                                                                    }
                                                                    r->enc = (OSSL_PARAM *)p;
# endif
                                                                    break;
                                                                }
                                                                break;
                                                            }
                                                            break;
                                                        }
                                                        break;
                                                    case 'i':
# if !defined(OPENSSL_NO_MULTIBLOCK)
                                                        if (ossl_likely(strcmp("nterleave", s + 11) == 0)) {
                                                            /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE */
                                                            if (ossl_unlikely(r->ileave != NULL)) {
                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                               "param %s is repeated", s);
                                                                return 0;
                                                            }
                                                            r->ileave = (OSSL_PARAM *)p;
                                                        }
# endif
                                                        break;
                                                    case 'm':
# if !defined(OPENSSL_NO_MULTIBLOCK)
                                                        if (ossl_likely(strcmp("axsndfrag", s + 11) == 0)) {
                                                            /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT */
                                                            if (ossl_unlikely(r->maxfrag != NULL)) {
                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                               "param %s is repeated", s);
                                                                return 0;
                                                            }
                                                            r->maxfrag = (OSSL_PARAM *)p;
                                                        }
# endif
                                                        break;
                                                    }
                                                    break;
                                                }
                                                break;
                                            }
                                            break;
                                        }
                                        break;
                                    }
                                    break;
                                }
                                break;
                            }
                            break;
                        case 'a':
                            if (ossl_likely(strcmp("ad", s + 4) == 0)) {
                                /* OSSL_CIPHER_PARAM_AEAD_TLS1_AAD */
                                if (ossl_unlikely(r->tlsaad != NULL)) {
                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                   "param %s is repeated", s);
                                    return 0;
                                }
                                r->tlsaad = (OSSL_PARAM *)p;
                            }
                        }
                    }
                }
            }
    return 1;
}
#endif
/* End of machine generated */

/* Machine generated by util/perl/OpenSSL/paramnames.pm */
#ifndef aes_cbc_hmac_sha_get_ctx_params_list
static const OSSL_PARAM aes_cbc_hmac_sha_get_ctx_params_list[] = {
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE, NULL),
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM_uint(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE, NULL),
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM_uint(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN, NULL),
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN, NULL),
# endif
    OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD, NULL),
    OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_KEYLEN, NULL),
    OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_IVLEN, NULL),
    OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_IV, NULL, 0),
    OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_UPDATED_IV, NULL, 0),
    OSSL_PARAM_END
};
#endif

#ifndef aes_cbc_hmac_sha_get_ctx_params_st
struct aes_cbc_hmac_sha_get_ctx_params_st {
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM *enclen;
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM *inter;
# endif
    OSSL_PARAM *iv;
    OSSL_PARAM *ivlen;
    OSSL_PARAM *keylen;
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM *max;
# endif
# if !defined(OPENSSL_NO_MULTIBLOCK)
    OSSL_PARAM *packlen;
# endif
    OSSL_PARAM *pad;
    OSSL_PARAM *upd_iv;
};
#endif

#ifndef aes_cbc_hmac_sha_get_ctx_params_decoder
static int aes_cbc_hmac_sha_get_ctx_params_decoder
    (const OSSL_PARAM *p, struct aes_cbc_hmac_sha_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 'i':
                switch(s[1]) {
                default:
                    break;
                case 'v':
                    switch(s[2]) {
                    default:
                        break;
                    case 'l':
                        if (ossl_likely(strcmp("en", s + 3) == 0)) {
                            /* OSSL_CIPHER_PARAM_IVLEN */
                            if (ossl_unlikely(r->ivlen != NULL)) {
                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                               "param %s is repeated", s);
                                return 0;
                            }
                            r->ivlen = (OSSL_PARAM *)p;
                        }
                        break;
                    case '\0':
                        if (ossl_unlikely(r->iv != NULL)) {
                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                           "param %s is repeated", s);
                            return 0;
                        }
                        r->iv = (OSSL_PARAM *)p;
                    }
                }
                break;
            case 'k':
                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
                    /* OSSL_CIPHER_PARAM_KEYLEN */
                    if (ossl_unlikely(r->keylen != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->keylen = (OSSL_PARAM *)p;
                }
                break;
            case 't':
                switch(s[1]) {
                default:
                    break;
                case 'l':
                    switch(s[2]) {
                    default:
                        break;
                    case 's':
                        switch(s[3]) {
                        default:
                            break;
                        case '1':
                            switch(s[4]) {
                            default:
                                break;
                            case 'm':
                                switch(s[5]) {
                                default:
                                    break;
                                case 'u':
                                    switch(s[6]) {
                                    default:
                                        break;
                                    case 'l':
                                        switch(s[7]) {
                                        default:
                                            break;
                                        case 't':
                                            switch(s[8]) {
                                            default:
                                                break;
                                            case 'i':
                                                switch(s[9]) {
                                                default:
                                                    break;
                                                case '_':
                                                    switch(s[10]) {
                                                    default:
                                                        break;
                                                    case 'a':
# if !defined(OPENSSL_NO_MULTIBLOCK)
                                                        if (ossl_likely(strcmp("adpacklen", s + 11) == 0)) {
                                                            /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN */
                                                            if (ossl_unlikely(r->packlen != NULL)) {
                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                               "param %s is repeated", s);
                                                                return 0;
                                                            }
                                                            r->packlen = (OSSL_PARAM *)p;
                                                        }
# endif
                                                        break;
                                                    case 'e':
# if !defined(OPENSSL_NO_MULTIBLOCK)
                                                        if (ossl_likely(strcmp("nclen", s + 11) == 0)) {
                                                            /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN */
                                                            if (ossl_unlikely(r->enclen != NULL)) {
                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                               "param %s is repeated", s);
                                                                return 0;
                                                            }
                                                            r->enclen = (OSSL_PARAM *)p;
                                                        }
# endif
                                                        break;
                                                    case 'i':
# if !defined(OPENSSL_NO_MULTIBLOCK)
                                                        if (ossl_likely(strcmp("nterleave", s + 11) == 0)) {
                                                            /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE */
                                                            if (ossl_unlikely(r->inter != NULL)) {
                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                               "param %s is repeated", s);
                                                                return 0;
                                                            }
                                                            r->inter = (OSSL_PARAM *)p;
                                                        }
# endif
                                                        break;
                                                    case 'm':
# if !defined(OPENSSL_NO_MULTIBLOCK)
                                                        if (ossl_likely(strcmp("axbufsz", s + 11) == 0)) {
                                                            /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE */
                                                            if (ossl_unlikely(r->max != NULL)) {
                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                               "param %s is repeated", s);
                                                                return 0;
                                                            }
                                                            r->max = (OSSL_PARAM *)p;
                                                        }
# endif
                                                        break;
                                                    }
                                                    break;
                                                }
                                                break;
                                            }
                                            break;
                                        }
                                        break;
                                    }
                                    break;
                                }
                                break;
                            }
                            break;
                        case 'a':
                            if (ossl_likely(strcmp("adpad", s + 4) == 0)) {
                                /* OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD */
                                if (ossl_unlikely(r->pad != NULL)) {
                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                   "param %s is repeated", s);
                                    return 0;
                                }
                                r->pad = (OSSL_PARAM *)p;
                            }
                        }
                    }
                }
                break;
            case 'u':
                if (ossl_likely(strcmp("pdated-iv", s + 1) == 0)) {
                    /* OSSL_CIPHER_PARAM_UPDATED_IV */
                    if (ossl_unlikely(r->upd_iv != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->upd_iv = (OSSL_PARAM *)p;
                }
            }
    return 1;
}
#endif
/* End of machine generated */
