EVP_PKEY_CTX_new.pod 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. =pod
  2. =head1 NAME
  3. EVP_PKEY_CTX_new, EVP_PKEY_CTX_new_id, EVP_PKEY_CTX_dup, EVP_PKEY_CTX_free - public key algorithm context functions
  4. =head1 SYNOPSIS
  5. #include <openssl/evp.h>
  6. EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
  7. EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
  8. EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
  9. void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
  10. =head1 DESCRIPTION
  11. The EVP_PKEY_CTX_new() function allocates public key algorithm context using
  12. the algorithm specified in B<pkey> and ENGINE B<e>.
  13. The EVP_PKEY_CTX_new_id() function allocates public key algorithm context
  14. using the algorithm specified by B<id> and ENGINE B<e>. It is normally used
  15. when no B<EVP_PKEY> structure is associated with the operations, for example
  16. during parameter generation of key generation for some algorithms.
  17. EVP_PKEY_CTX_dup() duplicates the context B<ctx>.
  18. EVP_PKEY_CTX_free() frees up the context B<ctx>.
  19. If B<ctx> is NULL, nothing is done.
  20. =head1 NOTES
  21. The B<EVP_PKEY_CTX> structure is an opaque public key algorithm context used
  22. by the OpenSSL high level public key API. Contexts B<MUST NOT> be shared between
  23. threads: that is it is not permissible to use the same context simultaneously
  24. in two threads.
  25. =head1 RETURN VALUES
  26. EVP_PKEY_CTX_new(), EVP_PKEY_CTX_new_id(), EVP_PKEY_CTX_dup() returns either
  27. the newly allocated B<EVP_PKEY_CTX> structure of B<NULL> if an error occurred.
  28. EVP_PKEY_CTX_free() does not return a value.
  29. =head1 SEE ALSO
  30. L<EVP_PKEY_new(3)>
  31. =head1 HISTORY
  32. These functions were added in OpenSSL 1.0.0.
  33. =head1 COPYRIGHT
  34. Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
  35. Licensed under the Apache License 2.0 (the "License"). You may not use
  36. this file except in compliance with the License. You can obtain a copy
  37. in the file LICENSE in the source distribution or at
  38. L<https://www.openssl.org/source/license.html>.
  39. =cut