tatsuhiro-t/spdylay — pull request #46 by rgs1 (2012-12-03 06:53:52+00:00)
Title: [shrpx] read private key's passwd from a file

This avoids the need to provide the password for your
private key interactively.

It can be used via --passwd-key-file or passwd-key-file
in the given config file. The first line in the file
(without \n) will be treated as the passwd. There isn't
any validation and all lines after the first one (if any)
are ignored.

The security model behind this is a bit simplistic so I
am open to better ideas. Basically your password file
should be root:root (400) and you *should* drop root
and run as an unprivileged user.

If the file exists and a line can be read then a callback
will be set for the SSL ctxt and it'll feed the passwd
when the private key is read (if password is needed).