Coverage Report

Created: 2026-10-28 06:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl40/providers/implementations/signature/eddsa_sig.inc
Line
Count
Source
1
/*
2
 * Copyright 2025-2026 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 eddsa_get_ctx_params_list
14
static ossl_unused const OSSL_PARAM eddsa_get_ctx_params_list[] = {
15
    OSSL_PARAM_octet_string(OSSL_SIGNATURE_PARAM_ALGORITHM_ID, NULL, 0),
16
# if defined(FIPS_MODULE)
17
    OSSL_PARAM_int(OSSL_SIGNATURE_PARAM_FIPS_APPROVED_INDICATOR, NULL),
18
# endif
19
    OSSL_PARAM_END
20
};
21
#endif
22
23
#ifndef eddsa_get_ctx_params_st
24
struct eddsa_get_ctx_params_st {
25
    OSSL_PARAM *id;
26
};
27
#endif
28
29
#ifndef eddsa_get_ctx_params_decoder
30
static ossl_unused int eddsa_get_ctx_params_decoder
31
    (const OSSL_PARAM *p, struct eddsa_get_ctx_params_st *r)
32
0
{
33
0
    const char *s;
34
35
0
    memset(r, 0, sizeof(*r));
36
0
    if (p != NULL)
37
0
        for (; (s = p->key) != NULL; p++)
38
0
            switch(s[0]) {
39
0
            default:
40
0
                break;
41
0
            case 'a':
42
0
                if (ossl_likely(strcmp("lgorithm-id", s + 1) == 0)) {
43
                    /* OSSL_SIGNATURE_PARAM_ALGORITHM_ID */
44
0
                    if (ossl_unlikely(r->id != NULL)) {
45
0
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
46
0
                                       "param %s is repeated", s);
47
0
                        return 0;
48
0
                    }
49
0
                    r->id = (OSSL_PARAM *)p;
50
0
                }
51
0
                break;
52
0
            case 'f':
53
# if defined(FIPS_MODULE)
54
                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
55
                    /* OSSL_SIGNATURE_PARAM_FIPS_APPROVED_INDICATOR */
56
                    if (!OSSL_PARAM_set_int((OSSL_PARAM *)p, 1))
57
                        return 0;
58
                }
59
# endif
60
0
                break;
61
0
            }
62
0
    return 1;
63
0
}
64
#endif
65
/* End of machine generated */
66
67
/* Machine generated by util/perl/OpenSSL/paramnames.pm */
68
#ifndef eddsa_set_ctx_params_list
69
static ossl_unused const OSSL_PARAM eddsa_set_ctx_params_list[] = {
70
    OSSL_PARAM_utf8_string(OSSL_SIGNATURE_PARAM_INSTANCE, NULL, 0),
71
    OSSL_PARAM_octet_string(OSSL_SIGNATURE_PARAM_CONTEXT_STRING, NULL, 0),
72
    OSSL_PARAM_END
73
};
74
#endif
75
76
#ifndef eddsa_set_ctx_params_st
77
struct eddsa_set_ctx_params_st {
78
    OSSL_PARAM *ctx;
79
    OSSL_PARAM *inst;
80
};
81
#endif
82
83
#ifndef eddsa_set_ctx_params_decoder
84
static ossl_unused int eddsa_set_ctx_params_decoder
85
    (const OSSL_PARAM *p, struct eddsa_set_ctx_params_st *r)
86
587
{
87
587
    const char *s;
88
89
587
    memset(r, 0, sizeof(*r));
90
587
    if (p != NULL)
91
186
        for (; (s = p->key) != NULL; p++)
92
93
            switch(s[0]) {
93
93
            default:
94
93
                break;
95
93
            case 'c':
96
0
                if (ossl_likely(strcmp("ontext-string", s + 1) == 0)) {
97
                    /* OSSL_SIGNATURE_PARAM_CONTEXT_STRING */
98
0
                    if (ossl_unlikely(r->ctx != NULL)) {
99
0
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
100
0
                                       "param %s is repeated", s);
101
0
                        return 0;
102
0
                    }
103
0
                    r->ctx = (OSSL_PARAM *)p;
104
0
                }
105
0
                break;
106
0
            case 'i':
107
0
                if (ossl_likely(strcmp("nstance", s + 1) == 0)) {
108
                    /* OSSL_SIGNATURE_PARAM_INSTANCE */
109
0
                    if (ossl_unlikely(r->inst != NULL)) {
110
0
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
111
0
                                       "param %s is repeated", s);
112
0
                        return 0;
113
0
                    }
114
0
                    r->inst = (OSSL_PARAM *)p;
115
0
                }
116
93
            }
117
587
    return 1;
118
587
}
119
#endif
120
/* End of machine generated */
121
122
/* Machine generated by util/perl/OpenSSL/paramnames.pm */
123
#ifndef eddsa_set_variant_ctx_params_list
124
static ossl_unused const OSSL_PARAM eddsa_set_variant_ctx_params_list[] = {
125
    OSSL_PARAM_octet_string(OSSL_SIGNATURE_PARAM_CONTEXT_STRING, NULL, 0),
126
    OSSL_PARAM_END
127
};
128
#endif
129
130
#ifndef eddsa_set_variant_ctx_params_st
131
struct eddsa_set_variant_ctx_params_st {
132
    OSSL_PARAM *ctx;
133
};
134
#endif
135
136
#ifndef eddsa_set_variant_ctx_params_decoder
137
static ossl_unused int eddsa_set_variant_ctx_params_decoder
138
    (const OSSL_PARAM *p, struct eddsa_set_variant_ctx_params_st *r)
139
0
{
140
0
    const char *s;
141
142
0
    memset(r, 0, sizeof(*r));
143
0
    if (p != NULL)
144
0
        for (; (s = p->key) != NULL; p++)
145
0
            if (ossl_likely(strcmp("context-string", s + 0) == 0)) {
146
                /* OSSL_SIGNATURE_PARAM_CONTEXT_STRING */
147
0
                if (ossl_unlikely(r->ctx != NULL)) {
148
0
                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
149
0
                                   "param %s is repeated", s);
150
0
                    return 0;
151
0
                }
152
0
                r->ctx = (OSSL_PARAM *)p;
153
0
            }
154
0
    return 1;
155
0
}
156
#endif
157
/* End of machine generated */