]> git.ipfire.org Git - people/amarx/ipfire-2.x.git/commitdiff
openvpn: Honour DAYS_VALID for CA certificates.
authorErik Kapfer <erik.kapfer@ipfire.org>
Wed, 20 Jun 2012 17:54:45 +0000 (19:54 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 20 Jun 2012 17:54:45 +0000 (19:54 +0200)
html/cgi-bin/ovpnmain.cgi

index 0798128ebbce63c520cce209e39471d93f338280..398e9a78251c64518c7399520e78cd4c7e430036 100644 (file)
@@ -2910,7 +2910,7 @@ if ($cgiparams{'TYPE'} eq 'net') {
 
            # Sign the certificate request and move it
            # Sign the host certificate request
-           system('/usr/bin/openssl', 'ca', '-days', '999999',
+           system('/usr/bin/openssl', 'ca', '-days', "$cgiparams{'DAYS_VALID'}",
                '-batch', '-notext',
                '-in', $filename,
                '-out', "${General::swroot}/ovpn/certs/$cgiparams{'NAME'}cert.pem",
@@ -3089,7 +3089,7 @@ if ($cgiparams{'TYPE'} eq 'net') {
            }
        
            # Sign the host certificate request
-           system('/usr/bin/openssl', 'ca', '-days', '999999',
+           system('/usr/bin/openssl', 'ca', '-days', "$cgiparams{'DAYS_VALID'}",
                '-batch', '-notext',
                '-in',  "${General::swroot}/ovpn/certs/$cgiparams{'NAME'}req.pem",
                '-out', "${General::swroot}/ovpn/certs/$cgiparams{'NAME'}cert.pem",