Coverage Report

Created: 2025-11-11 06:20

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl/providers/implementations/digests/mdc2_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 mdc2_set_ctx_params_list
14
static const OSSL_PARAM mdc2_set_ctx_params_list[] = {
15
    OSSL_PARAM_uint(OSSL_DIGEST_PARAM_PAD_TYPE, NULL),
16
    OSSL_PARAM_END
17
};
18
#endif
19
20
#ifndef mdc2_set_ctx_params_st
21
struct mdc2_set_ctx_params_st {
22
    OSSL_PARAM *pad;
23
};
24
#endif
25
26
#ifndef mdc2_set_ctx_params_decoder
27
static int mdc2_set_ctx_params_decoder
28
    (const OSSL_PARAM *p, struct mdc2_set_ctx_params_st *r)
29
62
{
30
62
    const char *s;
31
32
62
    memset(r, 0, sizeof(*r));
33
62
    if (p != NULL)
34
0
        for (; (s = p->key) != NULL; p++)
35
0
            if (ossl_likely(strcmp("pad-type", s + 0) == 0)) {
36
                /* OSSL_DIGEST_PARAM_PAD_TYPE */
37
0
                if (ossl_unlikely(r->pad != 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->pad = (OSSL_PARAM *)p;
43
0
            }
44
62
    return 1;
45
62
}
46
#endif
47
/* End of machine generated */