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