HSAdmin Backend Domains, E-Mail, Datenbanken
Michael Hierweck
2017-06-27 385c02fd531e0b16da2cd7f9b6c61966f5329837
Initially generated TLS self-signed certificates are not wildcard certificates any more but single domain certificats (cn=vhost-name).
1 files deleted
1 files modified
26 ■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 14 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/openssl-sna.vm 12 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -272,20 +272,20 @@
        ifOption(templateVars, query, "htdocsfallback", Boolean.TRUE, Boolean.FALSE);
        ifOption(templateVars, query, "letsencrypt", Boolean.TRUE, Boolean.FALSE);
        final Processor domSetupProcessor = new CompoundProcessor(
            new CreateFileProcessor("/de/hsadmin/mods/dom/openssl-sna.vm", templateVars, dom, "/tmp/openssl-sna.cnf", "root", "root", "644", true),
            new ShellProcessor("export PEMS_DIR=/etc/apache2/pems-generated && "
                    + "mkdir -p $PEMS_DIR && "
                    + "cd $PEMS_DIR && "
                    + "( ls _." + domName + ".crt || ( echo \"\" > _." + domName + ".chain && "
                    + "openssl req -x509 -newkey rsa:2048 -keyout _." + domName + ".key -out _." + domName + ".crt -days 1100 -nodes -sha256 -config /tmp/openssl-sna.cnf ) ) && "
                    + "chmod 400 _." + domName + "*"),
                    + "( ls " + domName + ".crt || ( echo \"\" >" + domName + ".chain && "
          + "openssl req -x509 -newkey rsa:4096 -sha256 -subj '/CN=" + domName + "' -keyout domName + ".key -out " + domName + ".crt -days 1 -nodes) ) &&
                    + "chmod 660 " + domName + "*" && "
          + "chown root:acmebot" + domName + "*" ),
            new ShellProcessor("export PEMS_DIR=/etc/apache2/pems-enabled && "
                    + "mkdir -p $PEMS_DIR && "
                    + "cd $PEMS_DIR && "
                    + "( ls " + domName + ".crt ||"
                    + " ( ln -s ../pems-generated/_." + domName + ".key " + domName + ".key"
                            + " && ln -s ../pems-generated/_." + domName + ".crt " + domName + ".crt"
                            + " && ln -s ../pems-generated/_." + domName + ".chain " + domName + ".chain ) ) && "
                    + " ( ln -s ../pems-generated/" + domName + ".key " + domName + ".key"
                            + " && ln -s ../pems-generated/" + domName + ".crt " + domName + ".crt"
                            + " && ln -s ../pems-generated/" + domName + ".chain " + domName + ".chain ) ) && "
                    + "chmod 400 " + domName + "*"),
            new CreateFileProcessor("/de/hsadmin/mods/dom/apache-vhost.vm", templateVars, dom, "/etc/apache2/sites-available/" + domName + ".tmp", "root", "root", "644", true),
            new ShellProcessor(
hsarback/src/de/hsadmin/mods/dom/openssl-sna.vm
File was deleted