1OSSL_PARAM_DUP(3ossl) OpenSSL OSSL_PARAM_DUP(3ossl)
2
3
4
6 OSSL_PARAM_dup, OSSL_PARAM_merge, OSSL_PARAM_free - OSSL_PARAM array
7 copy functions
8
10 #include <openssl/params.h>
11
12 OSSL_PARAM *OSSL_PARAM_dup(const OSSL_PARAM *params);
13 OSSL_PARAM *OSSL_PARAM_merge(const OSSL_PARAM *params, const OSSL_PARAM *params1);
14 void OSSL_PARAM_free(OSSL_PARAM *params);
15
17 Algorithm parameters can be exported/imported from/to providers using
18 arrays of OSSL_PARAM(3). The following utility functions allow the
19 parameters to be duplicated and merged with other OSSL_PARAM(3) to
20 assist in this process.
21
22 OSSL_PARAM_dup() duplicates the parameter array params. This function
23 does a deep copy of the data.
24
25 OSSL_PARAM_merge() merges the parameter arrays params and params1 into
26 a new parameter array. If params and params1 contain values with the
27 same 'key' then the value from params1 will replace the param value.
28 This function does a shallow copy of the parameters. Either params or
29 params1 may be NULL. The behaviour of the merge is unpredictable if
30 params and params1 contain the same key, and there are multiple entries
31 within either array that have the same key.
32
33 OSSL_PARAM_free() frees the parameter array params that was created
34 using OSSL_PARAM_dup(), OSSL_PARAM_merge() or
35 OSSL_PARAM_BLD_to_param().
36
38 The functions OSSL_PARAM_dup() and OSSL_PARAM_merge() return a newly
39 allocated OSSL_PARAM(3) array, or NULL if there was an error. If both
40 parameters are NULL
41 then NULL is returned.
42
44 OSSL_PARAM(3), OSSL_PARAM_BLD(3)
45
47 The functions were added in OpenSSL 3.0.
48
50 Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
51
52 Licensed under the Apache License 2.0 (the "License"). You may not use
53 this file except in compliance with the License. You can obtain a copy
54 in the file LICENSE in the source distribution or at
55 <https://www.openssl.org/source/license.html>.
56
57
58
593.0.9 2023-07-27 OSSL_PARAM_DUP(3ossl)