{
BIO *key;
EVP_PKEY *pkey = NULL;
- int ret = check_key_file(file, private);
- if (ret < 0) {
- PARA_ERROR_LOG("%s\n", para_strerror(-ret));
- return NULL;
- }
key = BIO_new(BIO_s_file());
if (!key)
return NULL;
struct asymmetric_key *priv;
int ret;
+ ret = check_private_key_file(key_file);
+ if (ret < 0)
+ return ret;
if (inlen < 0)
return -E_RSA;
ret = get_asymmetric_key(key_file, LOAD_PRIVATE_KEY, &priv);