}
canl_err_code CANL_CALLCONV
+canl_cred_load_priv_key(canl_ctx ctx, canl_cred cred, EVP_PKEY *pkey)
+{
+ glb_ctx *cc = (glb_ctx*) ctx;
+ creds *crd = (creds*) cred;
+ int ret = 0;
+
+ if (!ctx)
+ return EINVAL;
+
+ if (!cred)
+ return set_error(cc, EINVAL, POSIX_ERROR, "Cred. handler"
+ " not initialized" );
+ if (!pkey)
+ return set_error(cc, EINVAL, POSIX_ERROR, "Invalid private key"
+ " parameter");
+ pkey_dup(&crd->c_key, pkey);
+
+ return ret;
+}
+
+canl_err_code CANL_CALLCONV
canl_cred_load_chain(canl_ctx ctx, canl_cred cred, STACK_OF(X509) *cert_stack)
{
glb_ctx *cc = (glb_ctx*) ctx;
(key_size <= DEF_KEY_LEN_LONGER))
return set_error(cc, CANL_ERR_unknown, CANL_ERROR, "Cannot"
"sign cert. request -the key is too short with "
- " respect to cert. lifetime");
+ "respect to cert. lifetime");
}
/*TODO flags - limited,version*/
canl_cred_load_priv_key_file(canl_ctx, canl_cred, const char *,
canl_password_callback, void *);
canl_err_code CANL_CALLCONV
+canl_cred_load_priv_key(canl_ctx, canl_cred, EVP_PKEY *);
+canl_err_code CANL_CALLCONV
canl_cred_save_priv_key(canl_ctx, canl_cred, EVP_PKEY **);
canl_err_code CANL_CALLCONV
time_t starttime, curtime;
int ret = -1, ret2 = -1;
unsigned long ssl_err = 0;
- canl_err_origin e_orig = UNKNOWN_ERROR;
long errorcode = 0;
int expected = 0;
int locl_timeout = -1;
ret2 = SSL_connect(ssl);
if (ret2 < 0) {
ssl_err = ERR_get_error();
- e_orig = SSL_ERROR;
}
expected = errorcode = SSL_get_error(ssl, ret2);
}