summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/engine
diff options
context:
space:
mode:
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/engine')
-rwxr-xr-xCryptlib/OpenSSL/crypto/engine/eng_all.c6
-rw-r--r--[-rwxr-xr-x]Cryptlib/OpenSSL/crypto/engine/eng_openssl.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/Cryptlib/OpenSSL/crypto/engine/eng_all.c b/Cryptlib/OpenSSL/crypto/engine/eng_all.c
index f29c167c..8a1b9c7c 100755
--- a/Cryptlib/OpenSSL/crypto/engine/eng_all.c
+++ b/Cryptlib/OpenSSL/crypto/engine/eng_all.c
@@ -102,14 +102,14 @@ void ENGINE_load_builtin_engines(void)
#if !defined(OPENSSL_NO_GMP) && !defined(OPENSSL_NO_HW_GMP)
ENGINE_load_gmp();
#endif
+#if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
+ ENGINE_load_capi();
+#endif
#endif
#ifndef OPENSSL_NO_HW
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)
ENGINE_load_cryptodev();
#endif
-#if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
- ENGINE_load_capi();
-#endif
#endif
}
diff --git a/Cryptlib/OpenSSL/crypto/engine/eng_openssl.c b/Cryptlib/OpenSSL/crypto/engine/eng_openssl.c
index 7c139ae2..f1307039 100755..100644
--- a/Cryptlib/OpenSSL/crypto/engine/eng_openssl.c
+++ b/Cryptlib/OpenSSL/crypto/engine/eng_openssl.c
@@ -374,11 +374,15 @@ static EVP_PKEY *openssl_load_privkey(ENGINE *eng, const char *key_id,
BIO *in;
EVP_PKEY *key;
fprintf(stderr, "(TEST_ENG_OPENSSL_PKEY)Loading Private key %s\n", key_id);
+#ifndef OPENSSL_NO_STDIO
in = BIO_new_file(key_id, "r");
if (!in)
return NULL;
key = PEM_read_bio_PrivateKey(in, NULL, 0, NULL);
BIO_free(in);
+#else
+ return NULL;
+#endif
return key;
}
#endif