Coverage Report

Created: 2025-11-07 06:58

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl/providers/implementations/ciphers/cipher_aes_xts.inc
Line
Count
Source
1
/*
2
 * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
3
 *
4
 * Licensed under the Apache License 2.0 (the \"License\").  You may not use
5
 * this file except in compliance with the License.  You can obtain a copy
6
 * in the file LICENSE in the source distribution or at
7
 * https://www.openssl.org/source/license.html
8
 */
9
10
11
12
/* Machine generated by util/perl/OpenSSL/paramnames.pm */
13
#ifndef aes_xts_set_ctx_params_list
14
static const OSSL_PARAM aes_xts_set_ctx_params_list[] = {
15
    OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_KEYLEN, NULL),
16
    OSSL_PARAM_END
17
};
18
#endif
19
20
#ifndef aes_xts_set_ctx_params_st
21
struct aes_xts_set_ctx_params_st {
22
    OSSL_PARAM *keylen;
23
};
24
#endif
25
26
#ifndef aes_xts_set_ctx_params_decoder
27
static int aes_xts_set_ctx_params_decoder
28
    (const OSSL_PARAM *p, struct aes_xts_set_ctx_params_st *r)
29
164
{
30
164
    const char *s;
31
32
164
    memset(r, 0, sizeof(*r));
33
164
    if (p != NULL)
34
164
        for (; (s = p->key) != NULL; p++)
35
82
            if (ossl_likely(strcmp("keylen", s + 0) == 0)) {
36
                /* OSSL_CIPHER_PARAM_KEYLEN */
37
0
                if (ossl_unlikely(r->keylen != NULL)) {
38
0
                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
39
0
                                   "param %s is repeated", s);
40
0
                    return 0;
41
0
                }
42
0
                r->keylen = (OSSL_PARAM *)p;
43
0
            }
44
164
    return 1;
45
164
}
46
#endif
47
/* End of machine generated */