1 year ago

#371352

test-img

Luc Techer

Get EVP_PKEY from EVP_PKEY_CTX

I have a function that takes as parameter an EVP_PKEY_CTX*. I cannot modify the function signature in any way. Is there any way to get the EVP_PKEY object from the EVP_PKEY_CTX ?

My code would look something like this :

void foo(EVP_PKEY_CTX *ctx) {
    EVP_PKEY *pkey;
    pkey = ctx->pkey // This does not work but it is essentially what I want to do
    // Do operations with pkey
    bar(pkey);
}

c++

c

openssl

libcrypto

0 Answers

Your Answer

Accepted video resources