2
0

evp_keymgmt_newdata.pod 3.2 KB

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