EVP_PKEY_CTX_get0_pkey.pod 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. =pod
  2. =head1 NAME
  3. EVP_PKEY_CTX_get0_pkey,
  4. EVP_PKEY_CTX_get0_peerkey
  5. - functions for accessing the EVP_PKEY associated with an EVP_PKEY_CTX
  6. =head1 SYNOPSIS
  7. #include <openssl/evp.h>
  8. EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
  9. EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
  10. =head1 DESCRIPTION
  11. EVP_PKEY_CTX_get0_pkey() is used to access the B<EVP_PKEY>
  12. associated with the given B<EVP_PKEY_CTX> I<ctx>.
  13. The B<EVP_PKEY> obtained is the one used for creating the B<EVP_PKEY_CTX>
  14. using either L<EVP_PKEY_CTX_new(3)> or L<EVP_PKEY_CTX_new_from_pkey(3)>.
  15. EVP_PKEY_CTX_get0_peerkey() is used to access the peer B<EVP_PKEY>
  16. associated with the given B<EVP_PKEY_CTX> I<ctx>.
  17. The peer B<EVP_PKEY> obtained is the one set using
  18. either L<EVP_PKEY_derive_set_peer(3)> or L<EVP_PKEY_derive_set_peer_ex(3)>.
  19. =head1 RETURN VALUES
  20. EVP_PKEY_CTX_get0_pkey() returns the B<EVP_PKEY> associated with the
  21. EVP_PKEY_CTX or NULL if it is not set.
  22. EVP_PKEY_CTX_get0_peerkey() returns the peer B<EVP_PKEY> associated with the
  23. EVP_PKEY_CTX or NULL if it is not set.
  24. The returned EVP_PKEY objects are owned by the EVP_PKEY_CTX,
  25. and therefore should not explicitly be freed by the caller.
  26. These functions do not affect the EVP_PKEY reference count.
  27. They merely act as getter functions, and should be treated as such.
  28. =head1 SEE ALSO
  29. L<EVP_PKEY_CTX_new(3)>, L<EVP_PKEY_CTX_new_from_pkey(3)>,
  30. L<EVP_PKEY_derive_set_peer(3)>, L<EVP_PKEY_derive_set_peer_ex(3)>
  31. =head1 COPYRIGHT
  32. Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
  33. Licensed under the Apache License 2.0 (the "License").
  34. You may not use this file except in compliance with the License.
  35. You can obtain a copy in the file LICENSE in the source distribution or at
  36. L<https://www.openssl.org/source/license.html>.
  37. =cut