Coverage Report

Created: 2026-05-30 06:06

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
#include <string.h>
14
#include <openssl/params.h>
15
#include "internal/common.h"
16
#include "prov/proverr.h"
17
18
#ifndef aes_xts_set_ctx_params_list
19
static const OSSL_PARAM aes_xts_set_ctx_params_list[] = {
20
    OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_KEYLEN, NULL),
21
    OSSL_PARAM_END
22
};
23
#endif
24
25
#ifndef aes_xts_set_ctx_params_st
26
struct aes_xts_set_ctx_params_st {
27
    OSSL_PARAM *keylen;
28
};
29
#endif
30
31
#ifndef aes_xts_set_ctx_params_decoder
32
static int aes_xts_set_ctx_params_decoder
33
    (const OSSL_PARAM *p, struct aes_xts_set_ctx_params_st *r)
34
1.11k
{
35
1.11k
    const char *s;
36
37
1.11k
    memset(r, 0, sizeof(*r));
38
1.11k
    if (p != NULL)
39
1.11k
        for (; (s = p->key) != NULL; p++)
40
558
            if (ossl_likely(strcmp("keylen", s + 0) == 0)) {
41
                /* OSSL_CIPHER_PARAM_KEYLEN */
42
0
                if (ossl_unlikely(r->keylen != NULL)) {
43
0
                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
44
0
                                   "param %s is repeated", s);
45
0
                    return 0;
46
0
                }
47
0
                r->keylen = (OSSL_PARAM *)p;
48
0
            }
49
1.11k
    return 1;
50
1.11k
}
51
#endif
52
/* End of machine generated */