From: Daniel KouĊ™il Date: Tue, 17 Jan 2012 20:12:20 +0000 (+0000) Subject: Added ssl_finish() to free the global context X-Git-Tag: emi-canl-c_R_1_0_0_0~47 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=af4b1f409ef36a483d472e8647cf1a6b353f25dc;p=jra1mw.git Added ssl_finish() to free the global context --- diff --git a/emi.canl.canl-c/src/canl_locl.h b/emi.canl.canl-c/src/canl_locl.h index 84c31f0..66504cf 100644 --- a/emi.canl.canl-c/src/canl_locl.h +++ b/emi.canl.canl-c/src/canl_locl.h @@ -104,6 +104,9 @@ typedef struct canl_mech { canl_err_code (*initialize) (void **); + canl_err_code (*finish) + (void *); + canl_err_code (*client_init) (glb_ctx *, void **); @@ -113,9 +116,6 @@ typedef struct canl_mech { canl_err_code (*free_ctx) (glb_ctx *, void *); - canl_err_code (*free_global_ctx) /* XXX: ???? */ - (glb_ctx *, void *); - canl_err_code (*connect) (glb_ctx *, void *, io_handler *, struct timeval *, const char *); diff --git a/emi.canl.canl-c/src/canl_ssl.c b/emi.canl.canl-c/src/canl_ssl.c index 0c6be1e..9e48457 100644 --- a/emi.canl.canl-c/src/canl_ssl.c +++ b/emi.canl.canl-c/src/canl_ssl.c @@ -756,6 +756,13 @@ ssl_free(glb_ctx *cc, void *ctx) return 0; } +int +ssl_finish(glb_ctx *cc, void *ctx) +{ + SSL_CTX_free(ctx); + return 0; +} + canl_err_code canl_ctx_set_ssl_cred(canl_ctx cc, char *cert, char *key, canl_password_callback cb, void *userdata)