evp_pkey_make_provided.pod 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. =pod
  2. =head1 NAME
  3. evp_pkey_make_provided - internal EVP_PKEY support functions for providers
  4. =head1 SYNOPSIS
  5. /* Only for EVP source */
  6. #include "evp_local.h"
  7. void *evp_pkey_make_provided(EVP_PKEY *pk, OPENSSL_CTX *libctx,
  8. EVP_KEYMGMT **keymgmt, const char *propquery);
  9. =head1 DESCRIPTION
  10. evp_pkey_make_provided() ensures that the B<EVP_PKEY> I<pk> is provided within
  11. the library context I<libctx> (NULL means the default context). I<keymgmt>
  12. may point at a reference to a B<EVP_KEYMGMT>, and works as an input/output
  13. parameter.
  14. As input to this function, it can be used to specify a B<EVP_KEYMGMT> to be
  15. used for exporting. If not (I<*keymgmt> is NULL), then this function will
  16. fetch an B<EVP_KEYMGMT> implicitly, using I<propquery> as property query string.
  17. As output from this function, I<*keymgmt> will be assigned the B<EVP_KEYMGMT>
  18. that was used, if the export was successful, otherwise it will be assigned NULL.
  19. =head1 RETURN VALUES
  20. evp_pkey_make_provided() returns the provider key data that was exported if
  21. I<pk> was successfully provided. Otherwise, NULL is returned.
  22. =head1 NOTES
  23. Some functions calling evp_pkey_make_provided() may have received a const
  24. key, and may therefore have to cast the key to non-const form to call this
  25. function. Since B<EVP_PKEY> is always dynamically allocated, this is OK.
  26. =head1 SEE ALSO
  27. L<OPENSSL_CTX(3)>, L<EVP_KEYMGMT(3)>
  28. =head1 HISTORY
  29. The functions described here were all added in OpenSSL 3.0.
  30. =head1 COPYRIGHT
  31. Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
  32. Licensed under the Apache License 2.0 (the "License"). You may not use
  33. this file except in compliance with the License. You can obtain a copy
  34. in the file LICENSE in the source distribution or at
  35. L<https://www.openssl.org/source/license.html>.
  36. =cut