EVP_PKEY_new, EVP_PKEY_up_ref, EVP_PKEY_free - private key allocation functions
int EVP_PKEY_up_ref(EVP_PKEY *key);
void EVP_PKEY_free(EVP_PKEY *key);
function allocates an empty EVP_PKEY
which is used by OpenSSL to store private keys. The reference count is set to
increments the reference count of key
decrements the reference count of key
and, if the
reference count is zero, frees it up. If key
is NULL, nothing is done.
structure is used by various OpenSSL functions which require
a general private key without reference to any particular algorithm.
The structure returned by EVP_PKEY_new()
is empty. To add a private key
to this empty structure the functions described in EVP_PKEY_set1_RSA(3)
should be used.
returns either the newly allocated EVP_PKEY
structure or NULL
if an error occurred.
returns 1 for success and 0 for failure.
exist in all versions of
was first added to OpenSSL 1.1.0.
Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the OpenSSL license (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy in the
file LICENSE in the source distribution or at