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