Home | History | Annotate | Line # | Download | only in man3
      1 =pod
      2 
      3 =head1 NAME
      4 
      5 evp_keymgmt_newdata, evp_keymgmt_freedata,
      6 evp_keymgmt_get_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 
     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 
     36 All these functions are helpers to call the provider's corresponding
     37 function.  They all have in common that they take a B<EVP_KEYMGMT> as
     38 first argument, which they also retrieve a provider context from when
     39 needed.  The rest of the arguments are simply passed on to the
     40 function they wrap around.
     41 
     42 evp_keymgmt_newdata() calls the method's new() function.
     43 
     44 evp_keymgmt_freedata() calls the method's free() function.
     45 
     46 (the name evp_keymgmt_freedata() was chosen to avoid a clash with
     47 EVP_KEYMGMT_free() on case insensitive systems, the name
     48 evp_keymgmt_newdata() was chosen for consistency)
     49 
     50 evp_keymgmt_get_params() calls the method's get_params() function.
     51 
     52 evp_keymgmt_has() calls the method's has() function.
     53 
     54 evp_keymgmt_validate() calls the method's validate() function.
     55 
     56 evp_keymgmt_import() calls the method's import() function.
     57 
     58 evp_keymgmt_import_types() calls the method's import_types() function.
     59 
     60 evp_keymgmt_export() calls the method's export() function.
     61 
     62 evp_keymgmt_export_types() calls the method's export_types() function.
     63 
     64 =head1 RETURN VALUES
     65 
     66 evp_keymgmt_newdata() returns a pointer to a provider side key object,
     67 or NULL on error.
     68 
     69 evp_keymgmt_import_types(), and evp_keymgmt_export_types() return a parameter
     70 descriptor for importing and exporting key data, or NULL if there are no such
     71 descriptors.
     72 
     73 All other functions return 1 on success and 0 on error.
     74 
     75 =head1 HISTORY
     76 
     77 The functions described here were all added in OpenSSL 3.0.
     78 
     79 =head1 COPYRIGHT
     80 
     81 Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
     82 
     83 Licensed under the Apache License 2.0 (the "License").  You may not use
     84 this file except in compliance with the License.  You can obtain a copy
     85 in the file LICENSE in the source distribution or at
     86 L<https://www.openssl.org/source/license.html>.
     87 
     88 =cut
     89