xref: /netbsd-src/crypto/external/bsd/openssl/lib/libcrypto/man/OSSL_PARAM_dup.3 (revision 7d9ffdb3e9da593a05c5e2169f72fc7bada08bc9)
$NetBSD: OSSL_PARAM_dup.3,v 1.5 2024/09/08 13:08:27 christos Exp $

-*- mode: troff; coding: utf-8 -*-
Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)

Standard preamble:
========================================================================
..
..
.. \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
. ds C` "" . ds C' "" 'br\} . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.

If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.

Avoid warning from groff about undefined register 'F'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF ========================================================================

Title "OSSL_PARAM_dup 3"
OSSL_PARAM_dup 3 2024-09-03 3.0.15 OpenSSL
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
NAME
OSSL_PARAM_dup, OSSL_PARAM_merge, OSSL_PARAM_free \- OSSL_PARAM array copy functions
SYNOPSIS
Header "SYNOPSIS" .Vb 1 #include <openssl/params.h> \& OSSL_PARAM *OSSL_PARAM_dup(const OSSL_PARAM *params); OSSL_PARAM *OSSL_PARAM_merge(const OSSL_PARAM *params, const OSSL_PARAM *params1); void OSSL_PARAM_free(OSSL_PARAM *params); .Ve
DESCRIPTION
Header "DESCRIPTION" Algorithm parameters can be exported/imported from/to providers using arrays of \fBOSSL_PARAM\|(3). The following utility functions allow the parameters to be duplicated and merged with other OSSL_PARAM\|(3) to assist in this process.

\fBOSSL_PARAM_dup() duplicates the parameter array params. This function does a deep copy of the data.

\fBOSSL_PARAM_merge() merges the parameter arrays params and params1 into a new parameter array. If params and params1 contain values with the same 'key' then the value from params1 will replace the param value. This function does a shallow copy of the parameters. Either params or params1 may be NULL. The behaviour of the merge is unpredictable if params and \fIparams1 contain the same key, and there are multiple entries within either array that have the same key.

\fBOSSL_PARAM_free() frees the parameter array params that was created using \fBOSSL_PARAM_dup(), OSSL_PARAM_merge() or OSSL_PARAM_BLD_to_param(). If the argument to OSSL_PARAM_free() is NULL, nothing is done.

"RETURN VALUES"
Header "RETURN VALUES" The functions OSSL_PARAM_dup() and OSSL_PARAM_merge() return a newly allocated \fBOSSL_PARAM\|(3) array, or NULL if there was an error. If both parameters are NULL then NULL is returned.
"SEE ALSO"
Header "SEE ALSO" \fBOSSL_PARAM\|(3), OSSL_PARAM_BLD\|(3)
HISTORY
Header "HISTORY" The functions were added in OpenSSL 3.0.
COPYRIGHT
Header "COPYRIGHT" Copyright 2021-2024 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.