Coverage Report

Created: 2026-09-12 06:55

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl41/providers/implementations/signature/eddsa_sig.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 <openssl/e_os2.h>
16
#include "internal/common.h"
17
#include "prov/proverr.h"
18
19
/* Machine generated */
20
#ifndef eddsa_get_ctx_params_list
21
static ossl_unused const OSSL_PARAM eddsa_get_ctx_params_list[] = {
22
    OSSL_PARAM_octet_string(OSSL_SIGNATURE_PARAM_ALGORITHM_ID, NULL, 0),
23
    OSSL_PARAM_END
24
};
25
#endif
26
27
#ifndef eddsa_get_ctx_params_st
28
struct eddsa_get_ctx_params_st {
29
    OSSL_PARAM *id;
30
};
31
#endif
32
33
#ifndef eddsa_get_ctx_params_decoder
34
static ossl_unused int eddsa_get_ctx_params_decoder
35
    (const OSSL_PARAM *p, struct eddsa_get_ctx_params_st *r)
36
0
{
37
0
    const char *s;
38
39
0
    memset(r, 0, sizeof(*r));
40
0
    if (p != NULL)
41
0
        for (; (s = p->key) != NULL; p++)
42
0
            if (ossl_likely(strcmp("algorithm-id", s + 0) == 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
    return 1;
52
0
}
53
#endif
54
/* End of machine generated */
55
56
/* Machine generated */
57
#ifndef eddsa_set_ctx_params_list
58
static ossl_unused const OSSL_PARAM eddsa_set_ctx_params_list[] = {
59
    OSSL_PARAM_utf8_string(OSSL_SIGNATURE_PARAM_INSTANCE, NULL, 0),
60
    OSSL_PARAM_octet_string(OSSL_SIGNATURE_PARAM_CONTEXT_STRING, NULL, 0),
61
    OSSL_PARAM_END
62
};
63
#endif
64
65
#ifndef eddsa_set_ctx_params_st
66
struct eddsa_set_ctx_params_st {
67
    OSSL_PARAM *ctx;
68
    OSSL_PARAM *inst;
69
};
70
#endif
71
72
#ifndef eddsa_set_ctx_params_decoder
73
static ossl_unused int eddsa_set_ctx_params_decoder
74
    (const OSSL_PARAM *p, struct eddsa_set_ctx_params_st *r)
75
84
{
76
84
    const char *s;
77
78
84
    memset(r, 0, sizeof(*r));
79
84
    if (p != NULL)
80
84
        for (; (s = p->key) != NULL; p++)
81
42
            switch(s[0]) {
82
42
            default:
83
42
                break;
84
42
            case 'c':
85
0
                if (ossl_likely(strcmp("ontext-string", s + 1) == 0)) {
86
                    /* OSSL_SIGNATURE_PARAM_CONTEXT_STRING */
87
0
                    if (ossl_unlikely(r->ctx != NULL)) {
88
0
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
89
0
                                       "param %s is repeated", s);
90
0
                        return 0;
91
0
                    }
92
0
                    r->ctx = (OSSL_PARAM *)p;
93
0
                }
94
0
                break;
95
0
            case 'i':
96
0
                if (ossl_likely(strcmp("nstance", s + 1) == 0)) {
97
                    /* OSSL_SIGNATURE_PARAM_INSTANCE */
98
0
                    if (ossl_unlikely(r->inst != 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->inst = (OSSL_PARAM *)p;
104
0
                }
105
42
            }
106
84
    return 1;
107
84
}
108
#endif
109
/* End of machine generated */
110
111
/* Machine generated */
112
#ifndef eddsa_set_variant_ctx_params_list
113
static ossl_unused const OSSL_PARAM eddsa_set_variant_ctx_params_list[] = {
114
    OSSL_PARAM_octet_string(OSSL_SIGNATURE_PARAM_CONTEXT_STRING, NULL, 0),
115
    OSSL_PARAM_END
116
};
117
#endif
118
119
#ifndef eddsa_set_variant_ctx_params_st
120
struct eddsa_set_variant_ctx_params_st {
121
    OSSL_PARAM *ctx;
122
};
123
#endif
124
125
#ifndef eddsa_set_variant_ctx_params_decoder
126
static ossl_unused int eddsa_set_variant_ctx_params_decoder
127
    (const OSSL_PARAM *p, struct eddsa_set_variant_ctx_params_st *r)
128
0
{
129
0
    const char *s;
130
131
0
    memset(r, 0, sizeof(*r));
132
0
    if (p != NULL)
133
0
        for (; (s = p->key) != NULL; p++)
134
0
            if (ossl_likely(strcmp("context-string", s + 0) == 0)) {
135
                /* OSSL_SIGNATURE_PARAM_CONTEXT_STRING */
136
0
                if (ossl_unlikely(r->ctx != NULL)) {
137
0
                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
138
0
                                   "param %s is repeated", s);
139
0
                    return 0;
140
0
                }
141
0
                r->ctx = (OSSL_PARAM *)p;
142
0
            }
143
0
    return 1;
144
0
}
145
#endif
146
/* End of machine generated */