HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2015-08-07 d08478b47ac55c371260d1cf8949f2f33e162bc1
sha256 and access restriction to generated certs and keys
1 files modified
3 ■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 3 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -273,7 +273,8 @@
                    + "mkdir -p $PEMS_DIR/ && "
                    + "cd $PEMS_DIR && "
                    + "echo \"\" > " + domName + ".chain && "
                    + "openssl req -x509 -newkey rsa:2048 -keyout " + domName + ".key -out " + domName + ".crt -days 1100 -nodes -subj '/CN=" + domName + "'"),
                    + "openssl req -x509 -newkey rsa:2048 -keyout " + domName + ".key -out " + domName + ".crt -days 1100 -nodes -sha256 -subj '/CN=" + domName + "' &&"
                    + "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(
                    " (diff -q /etc/apache2/sites-available/" + domName + ".tmp /etc/apache2/sites-available/" + domName + " && rm /etc/apache2/sites-available/" + domName + ".tmp ) " +