[MacPorts] #21385: apache2-2.2.13 Add a feature - auto generate SSL certificate file
MacPorts
noreply at macports.org
Mon Sep 14 23:26:23 PDT 2009
#21385: apache2-2.2.13 Add a feature - auto generate SSL certificate file
-------------------------------+--------------------------------------------
Reporter: naoya.n@… | Owner: macports-tickets@…
Type: request | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.8.0
Keywords: apache2 | Port:
-------------------------------+--------------------------------------------
Hi, I added a feature to apache2 port.
The feature is auto generate SSL certficate file(server.key & server.crt).
I added post-destroot trigger.
# Genarate SSL certificate file
set openssl ${prefix}/bin/openssl
if {![file exists ${confDir}/server.key]} {
system "${openssl} genrsa -rand randomfile >
${confDir}/server.key"
}
if {![file exists ${confDir}/server.crt]} {
set FQDN `/bin/hostname`
system "
cat << EOF | ${openssl} req -new -key ${confDir}/server.key -x509 -days
365 -out ${confDir}/server.crt 2>/dev/null
--
SomeState
SomeCity
SomeOrganization
SomeOrganizationalUnit
${FQDN}
root@${FQDN}
EOF
"
--
Ticket URL: <http://trac.macports.org/ticket/21385>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list