Coverage Report

Created: 2026-05-20 07:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl/providers/implementations/digests/sha2_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
#include <string.h>
14
#include <openssl/params.h>
15
#include "internal/common.h"
16
#include "prov/proverr.h"
17
18
#ifndef sha1_set_ctx_params_list
19
static const OSSL_PARAM sha1_set_ctx_params_list[] = {
20
    OSSL_PARAM_octet_string(OSSL_DIGEST_PARAM_SSL3_MS, NULL, 0),
21
    OSSL_PARAM_END
22
};
23
#endif
24
25
#ifndef sha1_set_ctx_params_st
26
struct sha1_set_ctx_params_st {
27
    OSSL_PARAM *ssl3_ms;
28
};
29
#endif
30
31
#ifndef sha1_set_ctx_params_decoder
32
static int sha1_set_ctx_params_decoder
33
    (const OSSL_PARAM *p, struct sha1_set_ctx_params_st *r)
34
15.9k
{
35
15.9k
    const char *s;
36
37
15.9k
    memset(r, 0, sizeof(*r));
38
15.9k
    if (p != NULL)
39
0
        for (; (s = p->key) != NULL; p++)
40
0
            if (ossl_likely(strcmp("ssl3-ms", s + 0) == 0)) {
41
                /* OSSL_DIGEST_PARAM_SSL3_MS */
42
0
                if (ossl_unlikely(r->ssl3_ms != 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->ssl3_ms = (OSSL_PARAM *)p;
48
0
            }
49
15.9k
    return 1;
50
15.9k
}
51
#endif
52
/* End of machine generated */