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