evp_keymgmt_newdata.pod 3.0 KB

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