EVP_PKEY *key;
fprintf(stderr, "(TEST_ENG_OPENSSL_PKEY)Loading Private key %s\n",
key_id);
+# if defined(OPENSSL_SYS_WINDOWS)
+ in = BIO_new_file(key_id, "rb");
+# else
in = BIO_new_file(key_id, "r");
+# endif
if (!in)
return NULL;
key = PEM_read_bio_PrivateKey(in, NULL, 0, NULL);
BIO *cert = NULL;
X509 *x = NULL;
+#if defined(OPENSSL_SYS_WINDOWS)
+ if ((cert = BIO_new_file(file, "rb")) == NULL)
+#else
if ((cert = BIO_new_file(file, "r")) == NULL)
+#endif
goto end;
x = PEM_read_bio_X509_AUX(cert, NULL, NULL, NULL);
end:
STACK_OF(X509_INFO) *allcerts = NULL;
int i;
+#if defined(OPENSSL_SYS_WINDOWS)
+ if ((certs = BIO_new_file(file, "rb")) == NULL)
+#else
if ((certs = BIO_new_file(file, "r")) == NULL)
+#endif
goto end;
if ((othercerts = sk_X509_new_null()) == NULL)
goto end;
BIO *key = NULL;
EVP_PKEY *pkey = NULL;
+#if defined(OPENSSL_SYS_WINDOWS)
+ if ((key = BIO_new_file(file, "rb")) == NULL)
+#else
if ((key = BIO_new_file(file, "r")) == NULL)
+#endif
goto end;
pkey = PEM_read_bio_PrivateKey(key, NULL, NULL, (char *)pass);
end:
if (type != X509_FILETYPE_PEM)
return X509_load_cert_file_ex(ctx, file, type, libctx, propq);
+#if defined(OPENSSL_SYS_WINDOWS)
+ in = BIO_new_file(file, "rb");
+#else
in = BIO_new_file(file, "r");
+#endif
if (in == NULL) {
ERR_raise(ERR_LIB_X509, ERR_R_BIO_LIB);
return 0;