xref: /freebsd/crypto/openssl/doc/internal/man3/evp_keymgmt_newdata.pod (revision ba3c1f5972d7b90feb6e6da47905ff2757e0fe57)
1=pod
2
3=head1 NAME
4
5evp_keymgmt_newdata, evp_keymgmt_freedata,
6evp_keymgmt_get_params,
7evp_keymgmt_has, evp_keymgmt_validate,
8evp_keymgmt_import, evp_keymgmt_import_types,
9evp_keymgmt_export, evp_keymgmt_export_types
10- internal KEYMGMT interface functions
11
12=head1 SYNOPSIS
13
14 #include "crypto/evp.h"
15
16 void *evp_keymgmt_newdata(const EVP_KEYMGMT *keymgmt);
17 void evp_keymgmt_freedata(const EVP_KEYMGMT *keymgmt, void *keyddata);
18 int evp_keymgmt_get_params(const EVP_KEYMGMT *keymgmt,
19                            void *keydata, OSSL_PARAM params[]);
20
21 int evp_keymgmt_has(const EVP_KEYMGMT *keymgmt, void *keyddata, int selection);
22 int evp_keymgmt_validate(const EVP_KEYMGMT *keymgmt, void *keydata,
23                          int selection);
24
25 int evp_keymgmt_import(const EVP_KEYMGMT *keymgmt, void *keydata,
26                        int selection, const OSSL_PARAM params[]);
27 const OSSL_PARAM *evp_keymgmt_import_types(const EVP_KEYMGMT *keymgmt,
28                                            int selection);
29 int evp_keymgmt_export(const EVP_KEYMGMT *keymgmt, void *keydata,
30                        int selection, OSSL_CALLBACK *param_cb, void *cbarg);
31 const OSSL_PARAM *evp_keymgmt_export_types(const EVP_KEYMGMT *keymgmt,
32                                            int selection);
33
34=head1 DESCRIPTION
35
36All these functions are helpers to call the provider's corresponding
37function.  They all have in common that they take a B<EVP_KEYMGMT> as
38first argument, which they also retrieve a provider context from when
39needed.  The rest of the arguments are simply passed on to the
40function they wrap around.
41
42evp_keymgmt_newdata() calls the method's new() function.
43
44evp_keymgmt_freedata() calls the method's free() function.
45
46(the name evp_keymgmt_freedata() was chosen to avoid a clash with
47EVP_KEYMGMT_free() on case insensitive systems, the name
48evp_keymgmt_newdata() was chosen for consistency)
49
50evp_keymgmt_get_params() calls the method's get_params() function.
51
52evp_keymgmt_has() calls the method's has() function.
53
54evp_keymgmt_validate() calls the method's validate() function.
55
56evp_keymgmt_import() calls the method's import() function.
57
58evp_keymgmt_import_types() calls the method's import_types() function.
59
60evp_keymgmt_export() calls the method's export() function.
61
62evp_keymgmt_export_types() calls the method's export_types() function.
63
64=head1 RETURN VALUES
65
66evp_keymgmt_newdata() returns a pointer to a provider side key object,
67or NULL on error.
68
69evp_keymgmt_import_types(), and evp_keymgmt_export_types() return a parameter
70descriptor for importing and exporting key data, or NULL if there are no such
71descriptors.
72
73All other functions return 1 on success and 0 on error.
74
75=head1 HISTORY
76
77The functions described here were all added in OpenSSL 3.0.
78
79=head1 COPYRIGHT
80
81Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
82
83Licensed under the Apache License 2.0 (the "License").  You may not use
84this file except in compliance with the License.  You can obtain a copy
85in the file LICENSE in the source distribution or at
86L<https://www.openssl.org/source/license.html>.
87
88=cut
89