Opened 15 years ago

Last modified 6 years ago

#21385 new enhancement

apache2-2.2.13 Add a feature - auto generate SSL certificate file

Reported by: n0ts (Naoya Nakazawa) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: Schamschula (Marius Schamschula), pixilla (Bradley Giesbrecht)
Port: apache2

Description (last modified by jmroot (Joshua Root))

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
"

Change History (5)

comment:1 Changed 15 years ago by jmroot (Joshua Root)

Description: modified (diff)
Keywords: apache2 removed
Owner: changed from macports-tickets@… to imajes@…
Port: apache2 added
Type: requestenhancement
Version: 1.8.0

Please remember WikiFormatting.

comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from imajes@… to macports-tickets@…

James Cox (imajes) retires as MacPorts maintainer (see macports-mgr archives)

comment:3 Changed 13 years ago by mark@…

Has this been implemented? Having just done RedHat 6 installing mod_ssl which automatically installs a usable example key, and allows to to easily make a self-signed key and crt, I've seemingly jumped through hoops trying to (eventually) generate a usable key in MacPorts's openssl. The https://trac.macports.org/wiki/howto/MAMP helped when I eventually found it. But the 2.2.17 port still didn't have the automatic key generation shown in this ticket. Safari doesn't seem to want to know about the certificate, but FireFox treats it as I expected.

comment:4 Changed 9 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to ryandesign@…

comment:5 Changed 6 years ago by jmroot (Joshua Root)

Cc: Schamschula pixilla added
Note: See TracTickets for help on using tickets.