Added ssl_finish() to free the global context
authorDaniel Kouřil <kouril@ics.muni.cz>
Tue, 17 Jan 2012 20:12:20 +0000 (20:12 +0000)
committerDaniel Kouřil <kouril@ics.muni.cz>
Tue, 17 Jan 2012 20:12:20 +0000 (20:12 +0000)
emi.canl.canl-c/src/canl_locl.h
emi.canl.canl-c/src/canl_ssl.c

index 84c31f0..66504cf 100644 (file)
@@ -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 *);
 
index 0c6be1e..9e48457 100644 (file)
@@ -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)