ECDHerr(ECDH_F_ECDH_DATA_NEW, ERR_R_MALLOC_FAILURE);
ECDHerr(ECDH_F_ECDH_DATA_NEW_METHOD, ERR_R_MALLOC_FAILURE);
ECDH_DATA *ECDH_DATA_new_method(ENGINE *engine)	{	ECDH_DATA *ret;	ret=(ECDH_DATA *)OPENSSL_malloc(sizeof(ECDH_DATA));	if (ret == NULL)		{		ECDHerr(ECDH_F_ECDH_DATA_NEW, ERR_R_MALLOC_FAILURE);		return(NULL);		}	ret->init = NULL;	ret->finish = ecdh_finish;	ret->meth = ECDH_get_default_method();	ret->engine = engine;#ifndef OPENSSL_NO_ENGINE	if (!ret->engine)		ret->engine = ENGINE_get_default_ECDH();	if (ret->engine)		{		ret->meth = ENGINE_get_ECDH(ret->engine);		if (!ret->meth)			{			ECDHerr(ECDH_F_ECDH_DATA_NEW, ERR_R_ENGINE_LIB);			ENGINE_finish(ret->engine);			OPENSSL_free(ret);			return NULL;			}		}#endif	ret->flags = ret->meth->flags;	CRYPTO_new_ex_data(CRYPTO_EX_INDEX_ECDH, ret, &ret->ex_data);#if 0	if ((ret->meth->init != NULL) && !ret->meth->init(ret))		{		CRYPTO_free_ex_data(CRYPTO_EX_INDEX_ECDH, ret, &ret->ex_data);		OPENSSL_free(ret);		ret=NULL;		}#endif		return(ret);	}