X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fstore%2Fstr_meth.c;h=a46de03a2600c4b5d3dff7aa55f6da832d471cf1;hb=71fc9b37aedb0ee7e664fba53696a11d0b879dd7;hp=e1c39bf06acc99a7ca053b2d609c30e792279328;hpb=9acef3bbd73090731487ea0011db17f3982779d5;p=oweals%2Fopenssl.git diff --git a/crypto/store/str_meth.c b/crypto/store/str_meth.c index e1c39bf06a..a46de03a26 100644 --- a/crypto/store/str_meth.c +++ b/crypto/store/str_meth.c @@ -65,8 +65,10 @@ STORE_METHOD *STORE_create_method(char *name) STORE_METHOD *store_method = (STORE_METHOD *)OPENSSL_malloc(sizeof(STORE_METHOD)); if (store_method) + { memset(store_method, 0, sizeof(*store_method)); - store_method->name = BUF_strdup(name); + store_method->name = BUF_strdup(name); + } return store_method; } @@ -81,6 +83,18 @@ void STORE_destroy_method(STORE_METHOD *store_method) OPENSSL_free(store_method); } +int STORE_method_set_initialise_function(STORE_METHOD *sm, STORE_INITIALISE_FUNC_PTR init_f) + { + sm->init = init_f; + return 1; + } + +int STORE_method_set_cleanup_function(STORE_METHOD *sm, STORE_CLEANUP_FUNC_PTR clean_f) + { + sm->clean = clean_f; + return 1; + } + int STORE_method_set_generate_function(STORE_METHOD *sm, STORE_GENERATE_OBJECT_FUNC_PTR generate_f) { sm->generate_object = generate_f; @@ -99,6 +113,12 @@ int STORE_method_set_store_function(STORE_METHOD *sm, STORE_STORE_OBJECT_FUNC_PT return 1; } +int STORE_method_set_modify_function(STORE_METHOD *sm, STORE_MODIFY_OBJECT_FUNC_PTR modify_f) + { + sm->modify_object = modify_f; + return 1; + } + int STORE_method_set_revoke_function(STORE_METHOD *sm, STORE_HANDLE_OBJECT_FUNC_PTR revoke_f) { sm->revoke_object = revoke_f; @@ -153,6 +173,16 @@ int STORE_method_set_ctrl_function(STORE_METHOD *sm, STORE_CTRL_FUNC_PTR ctrl_f) return 1; } +STORE_INITIALISE_FUNC_PTR STORE_method_get_initialise_function(STORE_METHOD *sm) + { + return sm->init; + } + +STORE_CLEANUP_FUNC_PTR STORE_method_get_cleanup_function(STORE_METHOD *sm) + { + return sm->clean; + } + STORE_GENERATE_OBJECT_FUNC_PTR STORE_method_get_generate_function(STORE_METHOD *sm) { return sm->generate_object; @@ -168,6 +198,11 @@ STORE_STORE_OBJECT_FUNC_PTR STORE_method_get_store_function(STORE_METHOD *sm) return sm->store_object; } +STORE_MODIFY_OBJECT_FUNC_PTR STORE_method_get_modify_function(STORE_METHOD *sm) + { + return sm->modify_object; + } + STORE_HANDLE_OBJECT_FUNC_PTR STORE_method_get_revoke_function(STORE_METHOD *sm) { return sm->revoke_object;