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