Coverage Report

Created: 2026-09-03 06:33

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl/providers/implementations/skeymgmt/generic.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
/* Machine generated by util/perl/OpenSSL/paramnames.pm */
12
#include <string.h>
13
#include <openssl/params.h>
14
#include <openssl/e_os2.h>
15
#include "internal/common.h"
16
#include "prov/proverr.h"
17
18
/* Machine generated */
19
#ifndef generic_skey_import_list
20
static ossl_unused const OSSL_PARAM generic_skey_import_list[] = {
21
    OSSL_PARAM_octet_string(OSSL_SKEY_PARAM_RAW_BYTES, NULL, 0),
22
    OSSL_PARAM_END
23
};
24
#endif
25
26
#ifndef generic_skey_import_st
27
struct generic_skey_import_st {
28
    OSSL_PARAM *raw_bytes;
29
};
30
#endif
31
32
#ifndef generic_skey_import_decoder
33
static ossl_unused int generic_skey_import_decoder
34
    (const OSSL_PARAM *p, struct generic_skey_import_st *r)
35
0
{
36
0
    const char *s;
37
38
0
    memset(r, 0, sizeof(*r));
39
0
    if (p != NULL)
40
0
        for (; (s = p->key) != NULL; p++)
41
0
            if (ossl_likely(strcmp("raw-bytes", s + 0) == 0)) {
42
                /* OSSL_SKEY_PARAM_RAW_BYTES */
43
0
                if (ossl_unlikely(r->raw_bytes != NULL)) {
44
0
                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
45
0
                                   "param %s is repeated", s);
46
0
                    return 0;
47
0
                }
48
0
                r->raw_bytes = (OSSL_PARAM *)p;
49
0
            }
50
0
    return 1;
51
0
}
52
#endif
53
/* End of machine generated */