72 #ifndef OPENSSL_NO_ENGINE
77 #include <openssl/fips.h>
82 static const ECDH_METHOD *default_ECDH_method = NULL;
84 static void *ecdh_data_new(
void);
85 static void *ecdh_data_dup(
void *);
86 static void ecdh_data_free(
void *);
90 default_ECDH_method =
meth;
95 if(!default_ECDH_method)
99 return FIPS_ecdh_openssl();
106 return default_ECDH_method;
123 #ifndef OPENSSL_NO_ENGINE
153 #ifndef OPENSSL_NO_ENGINE
172 if ((ret->
meth->init != NULL) && !ret->
meth->init(ret))
182 static void *ecdh_data_new(
void)
184 return (
void *)ECDH_DATA_new_method(NULL);
187 static void *ecdh_data_dup(
void *
data)
195 return (
void *)ecdh_data_new();
198 void ecdh_data_free(
void *data)
202 #ifndef OPENSSL_NO_ENGINE
219 ecdh_data_free, ecdh_data_free);
222 ecdh_data = (
ECDH_DATA *)ecdh_data_new();
223 if (ecdh_data == NULL)
226 ecdh_data_dup, ecdh_data_free, ecdh_data_free);
247 new_func, dup_func, free_func);