return b_written;
 }
 
+#if 0
 int canl_set_ctx_own_cert(canl_ctx cc, canl_x509 cert, 
         canl_stack_of_x509 chain, canl_pkey key)
 {
     }
         return err;
 }
+#endif
 
 
 typedef long canl_err_code;
 
+typedef char (*canl_password_callback)(canl_ctx cc, void *userdata);
+
 canl_ctx CANL_CALLCONV
 canl_create_ctx();
 
 const gss_OID CANL_CALLCONV
 canl_str2mech(canl_ctx, const char mech);
 
+canl_err_code CANL_CALLCONV
+canl_ctx_set_ssl_cred(canl_ctx cc, char *cert, char *key,
+                     canl_password_callback cb, void *userdata);
+
 #ifdef __cplusplus
 }       
 #endif 
 
 static int set_key_file(glb_ctx *cc, char *key);
 static int set_cert_file(glb_ctx *cc, char *cert);
 
+#if 0
 //TODO just stub
 int do_set_ctx_own_cert(glb_ctx *cc, canl_x509 cert, canl_stack_of_x509 chain, 
         canl_pkey key)
 */
     return 0;
 }
+#endif
 
 static int set_cert(glb_ctx *cc, X509 *cert)
 {
 
 
 #include "canl.h"
 
-#include "canl_ssl.h"
-
 typedef struct canl_err_desc {
     CANL_ERROR code;
     const char *desc;
         struct timeval *tout);
 int ssl_close(glb_ctx *cc, io_handler *io);
 
-int do_set_ctx_own_cert(glb_ctx *cc, canl_x509 cert, canl_stack_of_x509 chain, 
-        canl_pkey key);
-int do_set_ctx_own_cert_file(glb_ctx *cc, char *cert, char *key);
 #endif
 
     }
 
     if (serv_cert || serv_key){
-        err = canl_set_ctx_own_cert_file(my_ctx, serv_cert, serv_key, 
-                NULL, NULL);
+       err = canl_ctx_set_ssl_cred(my_ctx, serv_cert, serv_key, NULL, NULL);
         if (err) {
             printf("[SERVER] cannot set certificate or key to context: %s\n",
                   canl_get_error_message(my_ctx));
 
     }
 }
 
+canl_err_code 
+canl_ctx_set_ssl_cred(canl_ctx cc, char *cert, char *key,
+                     canl_password_callback cb, void *userdata)
+{
+    return ENOSYS;
+}
+
 #ifdef DEBUG
 static void dbg_print_ssl_error(int errorcode)
 {