diff --git a/src/libcrypto.c b/src/libcrypto.c index 2e635e66..d30c1ac5 100644 --- a/src/libcrypto.c +++ b/src/libcrypto.c @@ -1481,6 +1481,9 @@ int evp_build_pkey(const char* name, OSSL_PARAM_BLD *param_bld, rc = EVP_PKEY_fromdata(ctx, pkey, selection, params); if (rc != 1) { + SSH_LOG(SSH_LOG_WARNING, + "Failed to import private key: %s\n", + ERR_error_string(ERR_get_error(), NULL)); OSSL_PARAM_free(params); EVP_PKEY_CTX_free(ctx); return -1; diff --git a/src/pki_crypto.c b/src/pki_crypto.c index 08e59533..d21a76dd 100644 --- a/src/pki_crypto.c +++ b/src/pki_crypto.c @@ -967,6 +967,9 @@ ssh_string pki_private_key_to_pem(const ssh_key key, pkey = NULL; if (rc != 1) { + SSH_LOG(SSH_LOG_WARNING, + "Failed to write private key: %s\n", + ERR_error_string(ERR_get_error(), NULL)); goto err; }