On Wed, Oct 27, 2010, Paul Suhler wrote: > Hi, everyone. > > With the introduction of the EVP_PKEY_CTX_* functions in 1.0.0a, it > appears that EVP_SignFinal() now frees the EVP_PKEY it receives as its > first argument. In particular, the function now calls > EVP_PKEY_CTX_free(), which calls EVP_PKEY_free(). > > In 0.9.8o, EVP_SignFinal() does not seem to free the EVP_PKEY. > > 1) Am I correctly understanding the behaviors? > > 2) Was this change intentional? >
This is intentional, when the context is initialised with EVP_PKEY_CTX_new() for example the internal reference of the EVP_PKEY structure is incremented. The EVP_PKEY_free() decrements the reference count of the EVP_PKEY. This wont free the EVP_PKEY structure unless it is freed in the interim. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
