Coverage Report

Created: 2025-10-28 06:56

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl/providers/implementations/macs/poly1305_prov.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 poly1305_get_params_list
14
static const OSSL_PARAM poly1305_get_params_list[] = {
15
    OSSL_PARAM_size_t(OSSL_MAC_PARAM_SIZE, NULL),
16
    OSSL_PARAM_END
17
};
18
#endif
19
20
#ifndef poly1305_get_params_st
21
struct poly1305_get_params_st {
22
    OSSL_PARAM *size;
23
};
24
#endif
25
26
#ifndef poly1305_get_params_decoder
27
static int poly1305_get_params_decoder
28
    (const OSSL_PARAM *p, struct poly1305_get_params_st *r)
29
0
{
30
0
    const char *s;
31
32
0
    memset(r, 0, sizeof(*r));
33
0
    if (p != NULL)
34
0
        for (; (s = p->key) != NULL; p++)
35
0
            if (ossl_likely(strcmp("size", s + 0) == 0)) {
36
                /* OSSL_MAC_PARAM_SIZE */
37
0
                if (ossl_unlikely(r->size != 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->size = (OSSL_PARAM *)p;
43
0
            }
44
0
    return 1;
45
0
}
46
#endif
47
/* End of machine generated */
48
49
/* Machine generated by util/perl/OpenSSL/paramnames.pm */
50
#ifndef poly1305_set_ctx_params_list
51
static const OSSL_PARAM poly1305_set_ctx_params_list[] = {
52
    OSSL_PARAM_octet_string(OSSL_MAC_PARAM_KEY, NULL, 0),
53
    OSSL_PARAM_END
54
};
55
#endif
56
57
#ifndef poly1305_set_ctx_params_st
58
struct poly1305_set_ctx_params_st {
59
    OSSL_PARAM *key;
60
};
61
#endif
62
63
#ifndef poly1305_set_ctx_params_decoder
64
static int poly1305_set_ctx_params_decoder
65
    (const OSSL_PARAM *p, struct poly1305_set_ctx_params_st *r)
66
0
{
67
0
    const char *s;
68
69
0
    memset(r, 0, sizeof(*r));
70
0
    if (p != NULL)
71
0
        for (; (s = p->key) != NULL; p++)
72
0
            if (ossl_likely(strcmp("key", s + 0) == 0)) {
73
                /* OSSL_MAC_PARAM_KEY */
74
0
                if (ossl_unlikely(r->key != NULL)) {
75
0
                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
76
0
                                   "param %s is repeated", s);
77
0
                    return 0;
78
0
                }
79
0
                r->key = (OSSL_PARAM *)p;
80
0
            }
81
0
    return 1;
82
0
}
83
#endif
84
/* End of machine generated */