diff --git a/crypto/ecdsa/ecdsa.h b/crypto/ecdsa/ecdsa.h index 746c02060580a705f2cc4cb203d6004b410605d7..4f8197c3345192b13c74ea2430af700323d95949 100644 --- a/crypto/ecdsa/ecdsa.h +++ b/crypto/ecdsa/ecdsa.h @@ -256,6 +256,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 d559c9e1cb4a90cfa2b3193d8142ee56dd8b6991..7c5b8a9f8f99e60331f85c74612911876fb8a40f 100644 --- a/crypto/ecdsa/ecs_lib.c +++ b/crypto/ecdsa/ecs_lib.c @@ -328,4 +328,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 4b10530ad6387ea1bca52ff9468a0b867c619c82..238ac1ebc15858507186bf4be3985d68b2e4da5b 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 */