Coverage Report

Created: 2026-05-20 07:05

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 "internal/common.h"
15
#include "prov/proverr.h"
16
17
#ifndef generic_skey_import_list
18
static const OSSL_PARAM generic_skey_import_list[] = {
19
    OSSL_PARAM_octet_string(OSSL_SKEY_PARAM_RAW_BYTES, NULL, 0),
20
    OSSL_PARAM_END
21
};
22
#endif
23
24
#ifndef generic_skey_import_st
25
struct generic_skey_import_st {
26
    OSSL_PARAM *raw_bytes;
27
};
28
#endif
29
30
#ifndef generic_skey_import_decoder
31
static int generic_skey_import_decoder
32
    (const OSSL_PARAM *p, struct generic_skey_import_st *r)
33
0
{
34
0
    const char *s;
35
36
0
    memset(r, 0, sizeof(*r));
37
0
    if (p != NULL)
38
0
        for (; (s = p->key) != NULL; p++)
39
0
            if (ossl_likely(strcmp("raw-bytes", s + 0) == 0)) {
40
                /* OSSL_SKEY_PARAM_RAW_BYTES */
41
0
                if (ossl_unlikely(r->raw_bytes != NULL)) {
42
0
                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
43
0
                                   "param %s is repeated", s);
44
0
                    return 0;
45
0
                }
46
0
                r->raw_bytes = (OSSL_PARAM *)p;
47
0
            }
48
0
    return 1;
49
0
}
50
#endif
51
/* End of machine generated */