On Tue, Oct 05, 1999, EKR wrote:

> "Ralf S. Engelschall" <[EMAIL PROTECTED]> writes:
> > On Sun, Oct 03, 1999, Eric Rescorla wrote:
> > Yes, someone else also reported that the pass phrase dialog doesn't work
> > correctly under Win32. But I cannot fix it myself, because I've both no real
> > Win32 development environment available nor the knowledge to find out what
> > Win32 dislikes in the mod_ssl/OpenSSL dialog. And I have also to admit that
> > fixing Win32-*only* bugs is maximum low-priority on my TODO list, of course.
> > 
> > So if you want the dialog fixed for Win32, you have to help me in finding out
> > the problem. Where are the Win32 hackers under us? Can someone help us here
> > and provide a patch to make the dialog working under this Win32 environment?

> Ok, I've got the problem debugged somewhat more fully.
> 
> Password _reading_ works fine. 
> What doesn't work is that the prompt isn't getting printed.
> 
> EVP_read_pw_string() writes it's prompt to stderr, but
> at this stage in the game, stderr has already been remapped.
> To accomodate this, mod_ssl dup2()s stdout onto stderr,
> but stdout has also been redirected under Win32. (I don't
> know where) so this doesn't help.
> 
> I've successfully been able to open "con" in write mode
> and write there, but for some reason the obvious handoff
> to stderr with dup2() isn't working correctly. I suspect I've
> made some trivial mistake, but I'm not sure what it is.
> 
> That said, if you blindly type in the password, the server
> starts no problem, so it's easy to make it workable,
> if a little ugly.
> 
> If I manage to produce a shippable patch, I'll post it.

Ah, very interesting. So my guess that the file descriptor fiddling is the
actual problem was correct - as I comitted it in a comment for 2.4.6 now:

+        /* Pass Phrase Dialog doesn't work under Win32. We're guessing it's
+           related to the Unix style file descriptor fiddling which doesn't
+           work as expected under the Win32 environment. */

Now we only need a patch which solves it correctly.  Either by explicitly
opening "con:" or by fixing the part in Apache which redirected stderr.  I've
no problem by opening "con:" on Win32, because we already have to do a special
#ifdef WIN32..#endif section for this brain-dead platform, so a special kludge
like an open for "con:" doesn't matter very much.  Except there is more
elegant solution, of course.
                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to