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 Version 1

Reported by: n0ts (Naoya Nakazawa) Owned by: imajes@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
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 (1)

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.

Note: See TracTickets for help on using tickets.