canl_free_ctx(canl_ctx cc);
 
 canl_err_code CANL_CALLCONV
-canl_create_io_handler(canl_ctx cc, canl_io_handler*);
+canl_create_io_handler(canl_ctx cc, canl_io_handler *io);
 
 canl_err_code CANL_CALLCONV
 canl_io_connect(canl_ctx cc, canl_io_handler io, const char *host,
 
     if (proxy_crd->c_req) {
         EVP_PKEY *tmp_key = X509_REQ_get_pubkey(proxy_crd->c_req);
         if (!tmp_key)
-            return set_error(cc, 0, CANL_ERROR, "Cannot extract key out of"
-                    " the certificate request" );
+            return set_error(cc, CANL_ERR_unknown, CANL_ERROR, "Cannot"
+                    "extract key out of the certificate request" );
         key_size = EVP_PKEY_size(tmp_key);
         /*TODO free tmp_key? is it duplicate or poiter? */
         if ((proxy_crd->c_lifetime > LIFETIME_TRESHOLD) && 
                 (key_size <= DEF_KEY_LEN_LONGER))
-            return set_error(cc, 0, CANL_ERROR, "Cannot sign cert. request -"
-                    " the key is too short with respect to cert. lifetime");
+            return set_error(cc, CANL_ERR_unknown, CANL_ERROR, "Cannot" 
+                    "sign cert. request -the key is too short with "
+                   " respect to cert. lifetime");
     }
 
     /*TODO flags - limited,version*/