You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tony Heal <th...@pace2020.com> on 2007/10/16 19:11:55 UTC

[users@httpd] SSL pass phrase

I am using apache v 1.3.34-4.1 and openssl on Debian and I have set up SSL, Although I can restart apache using the init
script without issue I get prompted for a pass phrase if I stop and start apache. This is a problem if I have a power
loss as apache will wait in the background until it receives a pass phrase. Is there a way around this without
regenerating the server.key?

 

Tony Heal

Pace Systems Group, Inc.

800-624-5999

theal@pace2020.com

 

 


RE: [users@httpd] SSL pass phrase

Posted by Lindsay Hausner <li...@comodo.com>.
>Many Unixes (such as FreeBSD) allow you to chmod 000 a file and root can 
>still access and modify it.  It works on my box anyway.
>
>-- 
>Aaron Dalton
>http://perlkonig.com

You can also use the '-nodes' switch when generating the private key.  This
however, leaves it unencrypted so you must be careful w/ permissions (make
sure apache can read it).

Hope this helps.

lh..
http://www.trustix.org/






---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSL pass phrase

Posted by Aaron Dalton <aa...@daltons.ca>.
On Tue, 16 Oct 2007, William A. Rowe, Jr. wrote:

> Aaron Dalton wrote:
>> 
>> AFAIK there is no way around this.  If you do not want Apache to wait for a 
>> pass phrase, you have to strip the private key of encryption.  This of 
>> course has multiple security problems, but I'm afraid those are your only 
>> options that I am aware of.
>> 
>> $ openssl rsa -in encryptedkey.pem -out strippedkey.pem
>
> Of course providing a passphrase response program introduces just as many
> (if not more) security problems.  Your best bet is to make certain that
> strippedkey.pem is previously touch'ed, chmod'ded 600 and owned by root
> before you invoke the command, above.
>

Many Unixes (such as FreeBSD) allow you to chmod 000 a file and root can 
still access and modify it.  It works on my box anyway.

-- 
Aaron Dalton
http://perlkonig.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSL pass phrase

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Aaron Dalton wrote:
> 
> AFAIK there is no way around this.  If you do not want Apache to wait 
> for a pass phrase, you have to strip the private key of encryption.  
> This of course has multiple security problems, but I'm afraid those are 
> your only options that I am aware of.
> 
> $ openssl rsa -in encryptedkey.pem -out strippedkey.pem

Of course providing a passphrase response program introduces just as many
(if not more) security problems.  Your best bet is to make certain that
strippedkey.pem is previously touch'ed, chmod'ded 600 and owned by root
before you invoke the command, above.

Provided you start apache as root and have it setuid to another
User/Group, this is the safest course.  The certs/keys will be slurped up
during the config phase, and while the server is running no cgi would have
access to its contents.

Bill

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSL pass phrase

Posted by Michael McGlothlin <mi...@swplumb.com>.
Possibly you could rewrite the start scripts so that they wait to be 
prompted for the password and then auto-fill the password.

--
Michael McGlothlin
Southwest Plumbing Supply


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSL pass phrase

Posted by Dimitri Yioulos <dy...@firstbhph.com>.
On Tuesday 16 October 2007 2:58 pm, Aaron Dalton wrote:
> On Tue, 16 Oct 2007, Tony Heal wrote:
> > I am using apache v 1.3.34-4.1 and openssl on Debian and I have set up
> > SSL, Although I can restart apache using the init script without issue I
> > get prompted for a pass phrase if I stop and start apache. This is a
> > problem if I have a power loss as apache will wait in the background
> > until it receives a pass phrase. Is there a way around this without
> > regenerating the server.key?
>
> AFAIK there is no way around this.  If you do not want Apache to wait for
> a pass phrase, you have to strip the private key of encryption.  This of
> course has multiple security problems, but I'm afraid those are your only
> options that I am aware of.
>
> $ openssl rsa -in encryptedkey.pem -out strippedkey.pem
>
> --
> Aaron Dalton
> http://perlkonig.com
>
>
<CLIP>

If I understand what you're after, try the following:

1. Create a shell script called "ssl-pass" (or whatever you choose).  Add the 
following line to it:
echo "mypasphrase"
using your passphrase, of course; 

2. Add "SSLPassPhraseDialog exec:/pathto/ssl-pass" t httpd.conf.

(N.B. quotes are for clarity except where used with the echo command.)

You should now not be prompted for the phrase when you start apache.

HTH.

Dimitri

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSL pass phrase

Posted by Aaron Dalton <aa...@daltons.ca>.
On Tue, 16 Oct 2007, Tony Heal wrote:

> I am using apache v 1.3.34-4.1 and openssl on Debian and I have set up SSL, Although I can restart apache using the init
> script without issue I get prompted for a pass phrase if I stop and start apache. This is a problem if I have a power
> loss as apache will wait in the background until it receives a pass phrase. Is there a way around this without
> regenerating the server.key?
>

AFAIK there is no way around this.  If you do not want Apache to wait for 
a pass phrase, you have to strip the private key of encryption.  This of 
course has multiple security problems, but I'm afraid those are your only 
options that I am aware of.

$ openssl rsa -in encryptedkey.pem -out strippedkey.pem

-- 
Aaron Dalton
http://perlkonig.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSL pass phrase

Posted by Scott Courtney <sc...@sinenomine.net>.
On Tuesday 16 October 2007 14:40, Scott Courtney wrote:
> $ openssl -in foo.temp -out foo.key

Sorry -- that should be:

$ openssl rsa -in foo.temp -out foo.key

Scott

-- 
-----------------------------------------------------------------------------
Scott D. COURTNEY, Principal Engineer                  Sine Nomine Associates
scourtney@sinenomine.net                           http://www.sinenomine.net/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSL pass phrase

Posted by Scott Courtney <sc...@sinenomine.net>.
On Tuesday 16 October 2007 13:11, Tony Heal wrote:
> This is a problem if I have a power loss as apache will wait in the
> background until it receives a pass phrase. Is there a way around this
> without regenerating the server.key?  

Yes, there is. The "openssl" command line utility won't let you create a
passphraseless key, but it will let you remove the password from an existing
key. Just do a command like this:

$ mv foo.key foo.temp
$ openssl -in foo.temp -out foo.key

You'll have to enter the passphrase for the openssl command, but it will let
you create the output (foo.key) without a passphrase.

Scott

-- 
-----------------------------------------------------------------------------
Scott D. COURTNEY, Principal Engineer                  Sine Nomine Associates
scourtney@sinenomine.net                           http://www.sinenomine.net/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Mod_perl and includes

Posted by joy d <jo...@hotmail.it>.
use 'PerlRequire' to import a file in apache's startup time.

in this file you import the lib's path.ie,in httpd.conf:

PerlRequire  /opt/apache1.3/mylib/startup.pl

and in startup.pl:

use lib qw(/the/lib/path);

> Date: Tue, 16 Oct 2007 19:21:19 -0400
> From: trice@cisco.com
> To: users@httpd.apache.org
> Subject: [users@httpd] Mod_perl and includes
>
> I'm trying to bring up a server with mod_perl configuration original
> created for an Apache 2.0 server but on an Apache 1.3 server. The
> problem is that "PerlSwitches" isn't available on the mod_perl running
> on the 1.3 server. How can I get this library path included on a 1.3
> server?
>
>
>
> PerlSwitches -I /var/www/foo/bar/lib
> PerlModule BAR
>
> 
> SetHandler modperl
> PerlResponseHandler BAR
> 
>
> Thanks in advance,
> Tony
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See  for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Mod_perl and includes

Posted by "Tony Rice (trice)" <tr...@cisco.com>.
I'm trying to bring up a server with mod_perl configuration original
created for an Apache 2.0 server but on an Apache 1.3 server.  The
problem is that "PerlSwitches" isn't available on the mod_perl running
on the 1.3 server.  How can I get this library path included on a 1.3
server?



PerlSwitches -I /var/www/foo/bar/lib 
PerlModule  BAR
    
<Location /bar>
     SetHandler          modperl
     PerlResponseHandler BAR
</Location>

Thanks in advance,
Tony

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSL pass phrase

Posted by Zakai Kinan <ti...@yahoo.com>.
use this.

openssl rsa -in private.key.org -out private.key. 
Replace private.key with your key.

ZK


--- Ajai Khattri <aj...@bitblit.net> wrote:

> On Tue, 16 Oct 2007, Tony Heal wrote:
> 
> > I am using apache v 1.3.34-4.1 and openssl on
> Debian and I have set up SSL, Although I can restart
> apache using the init
> > script without issue I get prompted for a pass
> phrase if I stop and start apache. This is a problem
> if I have a power
> > loss as apache will wait in the background until
> it receives a pass phrase. Is there a way around
> this without
> > regenerating the server.key?
> 
> 
> Nope.
> 
> 
> 
> -- 
> Aj.
> 
> 
>
---------------------------------------------------------------------
> The official User-To-User support forum of the
> Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for
> more info.
> To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
>    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
> users-help@httpd.apache.org
> 
> 



      ____________________________________________________________________________________
Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.
http://autos.yahoo.com/index.html
 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSL pass phrase

Posted by Ajai Khattri <aj...@bitblit.net>.
On Tue, 16 Oct 2007, Tony Heal wrote:

> I am using apache v 1.3.34-4.1 and openssl on Debian and I have set up SSL, Although I can restart apache using the init
> script without issue I get prompted for a pass phrase if I stop and start apache. This is a problem if I have a power
> loss as apache will wait in the background until it receives a pass phrase. Is there a way around this without
> regenerating the server.key?


Nope.



-- 
Aj.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org