aboutsummaryrefslogtreecommitdiff
path: root/openssl/apps/apps.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-17 08:30:55 +0000
committermarha <marha@users.sourceforge.net>2010-06-17 08:30:55 +0000
commiteb8e32daea99b6e3ebf134efeeba184c23817f08 (patch)
treeffbda57952ba3f40612e6409bd9a95f9a0a892dc /openssl/apps/apps.c
parented16af1abc515d7cc3ff9c5794aef89551fe7494 (diff)
parentfef0b61e18b9c7475e4d6e67ddfc55db46573f4e (diff)
downloadvcxsrv-eb8e32daea99b6e3ebf134efeeba184c23817f08.tar.gz
vcxsrv-eb8e32daea99b6e3ebf134efeeba184c23817f08.tar.bz2
vcxsrv-eb8e32daea99b6e3ebf134efeeba184c23817f08.zip
svn merge ^/branches/released .
Diffstat (limited to 'openssl/apps/apps.c')
-rw-r--r--openssl/apps/apps.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/openssl/apps/apps.c b/openssl/apps/apps.c
index 5dccea70d..acc50df04 100644
--- a/openssl/apps/apps.c
+++ b/openssl/apps/apps.c
@@ -875,10 +875,17 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
if (format == FORMAT_ENGINE)
{
if (!e)
- BIO_printf(bio_err,"no engine specified\n");
+ BIO_printf(err,"no engine specified\n");
else
+ {
pkey = ENGINE_load_private_key(e, file,
ui_method, &cb_data);
+ if (!pkey)
+ {
+ BIO_printf(err,"cannot load %s from engine\n",key_descrip);
+ ERR_print_errors(err);
+ }
+ }
goto end;
}
#endif
@@ -923,7 +930,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
&pkey, NULL, NULL))
goto end;
}
-#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DSA)
+#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DSA) && !defined (OPENSSL_NO_RC4)
else if (format == FORMAT_MSBLOB)
pkey = b2i_PrivateKey_bio(key);
else if (format == FORMAT_PVK)
@@ -937,8 +944,11 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
}
end:
if (key != NULL) BIO_free(key);
- if (pkey == NULL)
+ if (pkey == NULL)
+ {
BIO_printf(err,"unable to load %s\n", key_descrip);
+ ERR_print_errors(err);
+ }
return(pkey);
}