diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-07-01 12:01:00 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-07-02 00:59:43 +0100 |
commit | 654ae3d6ad61367060ffc20db11c7cf86b8f95b8 (patch) | |
tree | 471021ea31376e4fcd76b1d01546b5d8afb283ac /crypto/ecdsa | |
parent | 70c739b8db87a66356bac69955ca6c8d6a9f3aa3 (diff) |
Accessor functions for app_data in ECDSA_METHOD
(cherry picked from commit 387b844ffdc79b733be0b1dbaddd2ac64a6c1192)
Diffstat (limited to 'crypto/ecdsa')
-rw-r--r-- | crypto/ecdsa/ecdsa.h | 15 | ||||
-rw-r--r-- | crypto/ecdsa/ecs_lib.c | 8 | ||||
-rw-r--r-- | crypto/ecdsa/ecs_locl.h | 2 |
3 files changed, 24 insertions, 1 deletions
diff --git a/crypto/ecdsa/ecdsa.h b/crypto/ecdsa/ecdsa.h index 418b218d12..55f959cd3d 100644 --- a/crypto/ecdsa/ecdsa.h +++ b/crypto/ecdsa/ecdsa.h @@ -241,6 +241,21 @@ ECDSA_METHOD *ECDSA_METHOD_new(ECDSA_METHOD *ecdsa_method); */ void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method); +/** Sets application specific data in the ECDSA_METHOD + * \param ecdsa_method pointer to existing ECDSA_METHOD + * \param app application specific data to set + */ + +void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app); + +/** Returns application specific data from a ECDSA_METHOD structure + * \param ecdsa_method pointer to ECDSA_METHOD structure + * \return pointer to application specific data. + */ + + +void * ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method); + /** Set the ECDSA_do_sign function in the ECDSA_METHOD * \param ecdsa_method pointer to existing ECDSA_METHOD * \param ecdsa_do_sign a funtion of type ECDSA_do_sign diff --git a/crypto/ecdsa/ecs_lib.c b/crypto/ecdsa/ecs_lib.c index 0d79469201..071349e314 100644 --- a/crypto/ecdsa/ecs_lib.c +++ b/crypto/ecdsa/ecs_lib.c @@ -347,4 +347,12 @@ void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method) OPENSSL_free(ecdsa_method); } +void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app) + { + ecdsa_method->app_data = app; + } +void * ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method) + { + return ecdsa_method->app_data; + } diff --git a/crypto/ecdsa/ecs_locl.h b/crypto/ecdsa/ecs_locl.h index 810def12e8..d03f53217a 100644 --- a/crypto/ecdsa/ecs_locl.h +++ b/crypto/ecdsa/ecs_locl.h @@ -79,7 +79,7 @@ struct ecdsa_method int (*finish)(EC_KEY *eckey); #endif int flags; - char *app_data; + void *app_data; }; /* The ECDSA_METHOD was allocated and can be freed */ |