summaryrefslogtreecommitdiffstats
path: root/apps/apps.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2005-11-03 15:31:28 +0000
committerAndy Polyakov <appro@openssl.org>2005-11-03 15:31:28 +0000
commiteff7cb41d1bbcef65b34d3f75307a1b4ad11c563 (patch)
treef6e3098764e9e165666385f62888eaeadcb4cf07 /apps/apps.c
parent7a6f825f0f7a7a4c6fe63c766bf6a16bd6be05db (diff)
Disable BIO_s_fd on CE and disable fd:N as password passing option on
all _WIN32 [see commentary for clarification].
Diffstat (limited to 'apps/apps.c')
-rw-r--r--apps/apps.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/apps.c b/apps/apps.c
index a9ac9e1b6a..827db9486c 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -642,6 +642,15 @@ static char *app_get_pass(BIO *err, char *arg, int keepbio)
BIO_printf(err, "Can't open file %s\n", arg + 5);
return NULL;
}
+#if !defined(_WIN32)
+ /*
+ * Under _WIN32, which covers even Win64 and CE, file
+ * descriptors referenced by BIO_s_fd are not inherited
+ * by child process and therefore below is not an option.
+ * It could have been an option if bss_fd.c was operating
+ * on real Windows descriptors, such as those obtained
+ * with CreateFile.
+ */
} else if(!strncmp(arg, "fd:", 3)) {
BIO *btmp;
i = atoi(arg + 3);
@@ -653,6 +662,7 @@ static char *app_get_pass(BIO *err, char *arg, int keepbio)
/* Can't do BIO_gets on an fd BIO so add a buffering BIO */
btmp = BIO_new(BIO_f_buffer());
pwdbio = BIO_push(btmp, pwdbio);
+#endif
} else if(!strcmp(arg, "stdin")) {
pwdbio = BIO_new_fp(stdin, BIO_NOCLOSE);
if(!pwdbio) {