From aa05e7caea28d9a7142ae89a38f8fa962695c687 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Sat, 2 Apr 2016 23:08:14 +0100 Subject: [PATCH] Rename get/set_app_data to get0/set0_app_data Also fixed a style issue Reviewed-by: Richard Levitte Reviewed-by: Stephen Henson --- crypto/dsa/dsa_meth.c | 4 ++-- doc/crypto/DSA_meth_new.pod | 8 ++++---- engines/e_capi.c | 6 +++--- include/openssl/dsa.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crypto/dsa/dsa_meth.c b/crypto/dsa/dsa_meth.c index 237f555c08..816e35ecc5 100644 --- a/crypto/dsa/dsa_meth.c +++ b/crypto/dsa/dsa_meth.c @@ -68,12 +68,12 @@ int DSA_meth_set_flags(DSA_METHOD *dsam, int flags) return 1; } -void *DSA_meth_get_app_data(const DSA_METHOD *dsam) +void *DSA_meth_get0_app_data(const DSA_METHOD *dsam) { return dsam->app_data; } -int DSA_meth_set_app_data(DSA_METHOD *dsam, void *app_data) +int DSA_meth_set0_app_data(DSA_METHOD *dsam, void *app_data) { dsam->app_data = app_data; return 1; diff --git a/doc/crypto/DSA_meth_new.pod b/doc/crypto/DSA_meth_new.pod index 5799ffa605..84584f1ce0 100644 --- a/doc/crypto/DSA_meth_new.pod +++ b/doc/crypto/DSA_meth_new.pod @@ -4,7 +4,7 @@ DSA_meth_new, DSA_meth_free, DSA_meth_dup, DSA_meth_get0_name, DSA_meth_set1_name, DSA_meth_get_flags, DSA_meth_set_flags, -DSA_meth_get_app_data, DSA_meth_set_app_data, DSA_meth_get_sign, +DSA_meth_get0_app_data, DSA_meth_set0_app_data, DSA_meth_get_sign, DSA_meth_set_sign, DSA_meth_get_sign_setup, DSA_meth_set_sign_setup, DSA_meth_get_verify, DSA_meth_set_verify, DSA_meth_get_mod_exp, DSA_meth_set_mod_exp, DSA_meth_get_bn_mod_exp, DSA_meth_set_bn_mod_exp, @@ -23,8 +23,8 @@ DSA_meth_set_keygen - Routines to build up DSA methods int DSA_meth_set1_name(DSA_METHOD *dsam, const char *name); int DSA_meth_get_flags(DSA_METHOD *dsam); int DSA_meth_set_flags(DSA_METHOD *dsam, int flags); - void *DSA_meth_get_app_data(const DSA_METHOD *dsam); - int DSA_meth_set_app_data(DSA_METHOD *dsam, void *app_data); + void *DSA_meth_get0_app_data(const DSA_METHOD *dsam); + int DSA_meth_set0_app_data(DSA_METHOD *dsam, void *app_data); DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam)) (const unsigned char *, int, DSA *); int DSA_meth_set_sign(DSA_METHOD *dsam, @@ -92,7 +92,7 @@ caller remains responsible for freeing the memory associated with the name. DSA_meth_get_flags() returns the current value of the flags associated with this DSA_METHOD. DSA_meth_set_flags() provides the ability to set these flags. -The functions DSA_meth_get_app_data() and DSA_meth_set_app_data() provide the +The functions DSA_meth_get0_app_data() and DSA_meth_set0_app_data() provide the ability to associate implementation specific data with the DSA_METHOD. It is the application's responsibility to free this data before the DSA_METHOD is freed via a call to DSA_meth_free(). diff --git a/engines/e_capi.c b/engines/e_capi.c index 4cec2f411c..f44acc91f3 100644 --- a/engines/e_capi.c +++ b/engines/e_capi.c @@ -478,12 +478,12 @@ static int capi_init(ENGINE *e) ossl_dsa_meth = DSA_OpenSSL(); if ( !DSA_meth_set_sign(capi_dsa_method, capi_dsa_do_sign) || !DSA_meth_set_verify(capi_dsa_method, - DSA_meth_get_verify(ossl_dsa_meth)) + DSA_meth_get_verify(ossl_dsa_meth)) || !DSA_meth_set_finish(capi_dsa_method, capi_dsa_free) || !DSA_meth_set_mod_exp(capi_dsa_method, - DSA_meth_get_mod_exp(ossl_dsa_meth)) + DSA_meth_get_mod_exp(ossl_dsa_meth)) || !DSA_meth_set_bn_mod_exp(capi_dsa_method, - DSA_meth_get_bn_mod_exp(ossl_dsa_meth))) { + DSA_meth_get_bn_mod_exp(ossl_dsa_meth))) { goto memerr; } } diff --git a/include/openssl/dsa.h b/include/openssl/dsa.h index bbe0902a53..1b045842e0 100644 --- a/include/openssl/dsa.h +++ b/include/openssl/dsa.h @@ -232,8 +232,8 @@ const char *DSA_meth_get0_name(const DSA_METHOD *dsam); int DSA_meth_set1_name(DSA_METHOD *dsam, const char *name); int DSA_meth_get_flags(DSA_METHOD *dsam); int DSA_meth_set_flags(DSA_METHOD *dsam, int flags); -void *DSA_meth_get_app_data(const DSA_METHOD *dsam); -int DSA_meth_set_app_data(DSA_METHOD *dsam, void *app_data); +void *DSA_meth_get0_app_data(const DSA_METHOD *dsam); +int DSA_meth_set0_app_data(DSA_METHOD *dsam, void *app_data); DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam)) (const unsigned char *, int, DSA *); int DSA_meth_set_sign(DSA_METHOD *dsam, -- 2.25.1