diff options
author | Bodo Möller <bodo@openssl.org> | 2012-10-05 22:50:11 +0200 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2012-10-05 22:50:11 +0200 |
commit | f11d0c7908b3124e2db72029e7e960294ca19b2e (patch) | |
tree | 53e75a416a0bfeeaba4410de11b90bb90ecee2fe /crypto/ec/ec.h | |
parent | If OPENSSL_SSL_DEBUG_BROKEN_PROTOCOL is set allow the use of "SCSV" as (diff) | |
download | openssl-f11d0c7908b3124e2db72029e7e960294ca19b2e.tar.xz openssl-f11d0c7908b3124e2db72029e7e960294ca19b2e.zip |
Fix EC_KEY initialization race.
Submitted by: Adam Langley
Diffstat (limited to 'crypto/ec/ec.h')
-rw-r--r-- | crypto/ec/ec.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/ec/ec.h b/crypto/ec/ec.h index ddb0e443b9..0dcad23294 100644 --- a/crypto/ec/ec.h +++ b/crypto/ec/ec.h @@ -810,7 +810,15 @@ void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform); /* functions to set/get method specific data */ void *EC_KEY_get_key_method_data(EC_KEY *key, void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *)); -void EC_KEY_insert_key_method_data(EC_KEY *key, void *data, +/** Sets the key method data of an EC_KEY object, if none has yet been set. + * \param key EC_KEY object + * \param data opaque data to install. + * \param dup_func a function that duplicates |data|. + * \param free_func a function that frees |data|. + * \param clear_free_func a function that wipes and frees |data|. + * \return the previously set data pointer, or NULL if |data| was inserted. + */ +void *EC_KEY_insert_key_method_data(EC_KEY *key, void *data, void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *)); /* wrapper functions for the underlying EC_GROUP object */ void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag); |