Opened 15 years ago
Last modified 7 years ago
#21385 new enhancement
apache2-2.2.13 Add a feature - auto generate SSL certificate file — at Initial Version
Reported by: | n0ts (Naoya Nakazawa) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | apache2 |
Description
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 "
Note: See
TracTickets for help on using
tickets.