Subject: RE: SSLPassPhraseDialog and VirtualHost

From: "Price, Gary" <[email-masked]>
Date: Tue, 5 Mar 2002 11:06:46 -0600

You will need a separate pass phrase and script placed in each virtual host
container.

Gary

-----Original Message-----
From: Bruno Georges [mailto:[email-masked]]
Sent: Tuesday, March 05, 2002 10:57 AM
To: [email-masked]; [email-masked]
Subject: SSLPassPhraseDialog and VirtualHost

Hi
I have a problem when trying to use the SSLPassPhraseDialog directive 
with "exec"
It works ok with 1 virtual host / 1 password , but not with 2 or more
The pp.out file just echo the password.

Local  httpd.conf shows:
----------------------------
<IfModule mod_ssl.c>
#   Pass Phrase Dialog:
#  #SSLPassPhraseDialog  builtin
SSLPassPhraseDialog exec:/content/ssl/pp/pp.out
</..>

The password file pp.out  with the 2 password for 2 vhost:
--------------
#!/bin/bash
echo "password1"
echo "password2"

I tried to startssl with 1 vhost, it works ok, but with 2 vhost , it 
shows the following error:
----------------------------------------------------------------------------
------------------------------------------------------------------- 

[Tue Mar  5 12:48:50 2002] [error] mod_ssl: Init: Pass phrase incorrect 
(OpenSSL library error follows)
[Tue Mar  5 12:48:50 2002] [error] OpenSSL: error:0D084069:asn1 encoding 
routines:d2i_ASN1_SET:bad tag
[Tue Mar  5 12:48:50 2002] [error] OpenSSL: error:0D09D082:asn1 encoding 
routines:d2i_RSAPrivateKey:parsing
[Tue Mar  5 12:48:50 2002] [error] OpenSSL: error:0D09B00D:asn1 encoding 
routines:d2i_PrivateKey:ASN1 lib

Any idea?

Regards
Bruno Georges

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]

---

From: Sang Yi <[email-masked]>
Date: Tue, 5 Mar 2002 09:19:16 -0800 (PST)

try something like this, a very simple sh script:

#!/bin/sh

PASS1=somepass1
PASS2=somepass2

case $1 in
    www.pass1.com:443) echo $PASS1;;
    www.pass2.com:443) echo $PASS2;;
esac

exit 0

without the exec, you'll see that apache requests a passphrase via stdin.  the 
exec basically redirects the stdout from the script it runs at start.

hope that helps.
-sang