Disable BIO_s_fd on CE and disable fd:N as password passing option on
all _WIN32 [see commentary for clarification].
This commit is contained in:
parent
7a6f825f0f
commit
eff7cb41d1
10
apps/apps.c
10
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);
|
BIO_printf(err, "Can't open file %s\n", arg + 5);
|
||||||
return NULL;
|
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)) {
|
} else if(!strncmp(arg, "fd:", 3)) {
|
||||||
BIO *btmp;
|
BIO *btmp;
|
||||||
i = atoi(arg + 3);
|
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 */
|
/* Can't do BIO_gets on an fd BIO so add a buffering BIO */
|
||||||
btmp = BIO_new(BIO_f_buffer());
|
btmp = BIO_new(BIO_f_buffer());
|
||||||
pwdbio = BIO_push(btmp, pwdbio);
|
pwdbio = BIO_push(btmp, pwdbio);
|
||||||
|
#endif
|
||||||
} else if(!strcmp(arg, "stdin")) {
|
} else if(!strcmp(arg, "stdin")) {
|
||||||
pwdbio = BIO_new_fp(stdin, BIO_NOCLOSE);
|
pwdbio = BIO_new_fp(stdin, BIO_NOCLOSE);
|
||||||
if(!pwdbio) {
|
if(!pwdbio) {
|
||||||
|
@ -56,6 +56,8 @@
|
|||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined(_WIN32_WCE)
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#define USE_SOCKETS
|
#define USE_SOCKETS
|
||||||
@ -292,3 +294,4 @@ int BIO_fd_non_fatal_error(int err)
|
|||||||
}
|
}
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user