]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Merge remote-tracking branch 'ummeegge/openvpn'
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Jun 2014 14:26:55 +0000 (16:26 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Jun 2014 14:26:55 +0000 (16:26 +0200)
html/cgi-bin/ovpnmain.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index 921009fc70ba194ffbcd22f9d1de34cca7756a88..45c2f6c6723db0a77e62e821918640bb77078bb9 100644 (file)
@@ -1530,6 +1530,17 @@ END
        exit(0);
     }
 
+###
+### Download tls-auth key
+###
+}elsif ($cgiparams{'ACTION'} eq $Lang::tr{'download tls-auth key'}) {
+    if ( -f "${General::swroot}/ovpn/certs/ta.key" ) {
+       print "Content-Type: application/octet-stream\r\n";
+       print "Content-Disposition: filename=ta.key\r\n\r\n";
+       print `/bin/cat ${General::swroot}/ovpn/certs/ta.key`;
+       exit(0);
+    }
+
 ###
 ### Form for generating a root certificate
 ###
@@ -2369,6 +2380,28 @@ if ($confighash{$cgiparams{'KEY'}}[3] eq 'net') {
                exit(0);
     }
 
+###
+### Display tls-auth key
+###
+} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'show tls-auth key'}) {
+
+    if (! -e "${General::swroot}/ovpn/certs/ta.key") {
+       $errormessage = $Lang::tr{'not present'};
+       } else {
+               &Header::showhttpheaders();
+               &Header::openpage($Lang::tr{'ovpn'}, 1, '');
+               &Header::openbigbox('100%', 'LEFT', '', '');
+               &Header::openbox('100%', 'LEFT', "$Lang::tr{'ta key'}:");
+               my $output = `/bin/cat ${General::swroot}/ovpn/certs/ta.key`;
+               $output = &Header::cleanhtml($output,"y");
+               print "<pre>$output</pre>\n";
+               &Header::closebox();
+               print "<div align='center'><a href='/cgi-bin/ovpnmain.cgi'>$Lang::tr{'back'}</a></div>";
+               &Header::closebigbox();
+               &Header::closepage();
+               exit(0);
+    }
+
 ###
 ### Display Certificate Revoke List
 ###
@@ -3155,7 +3188,6 @@ my $complzoactive;
 my $mssfixactive;
 my $authactive;
 my $n2nfragment;
-my $authactive;
 my @n2nmtudisc = split(/ /, (grep { /^mtu-disc/ } @firen2nconf)[0]);
 my @n2nproto2 = split(/ /, (grep { /^proto/ } @firen2nconf)[0]);
 my @n2nproto = split(/-/, $n2nproto2[1]);
@@ -5215,6 +5247,8 @@ END
     ;
        &Header::closebox();
        }
+
+    # CA/key listing
     &Header::openbox('100%', 'LEFT', "$Lang::tr{'certificate authorities'}");
     print <<END;
     <table width='100%' cellspacing='1' cellpadding='0' class='tbl'>
@@ -5227,7 +5261,10 @@ END
     ;
     my $col1="bgcolor='$color{'color22'}'";
     my $col2="bgcolor='$color{'color20'}'";
+    # DH parameter line
     my $col3="bgcolor='$color{'color22'}'";
+    # ta.key line
+    my $col4="bgcolor='$color{'color20'}'";
 
     if (-f "${General::swroot}/ovpn/ca/cacert.pem") {
                my $casubject = `/usr/bin/openssl x509 -text -in ${General::swroot}/ovpn/ca/cacert.pem`;
@@ -5239,15 +5276,16 @@ END
                <tr>
                        <td class='base' $col1>$Lang::tr{'root certificate'}</td>
                        <td class='base' $col1>$casubject</td>
-               <form method='post' name='frmrootcrta'><td width='3%' align='center' $col1>
+                       <form method='post' name='frmrootcrta'><td width='3%' align='center' $col1>
                        <input type='hidden' name='ACTION' value='$Lang::tr{'show root certificate'}' />
                        <input type='image' name='$Lang::tr{'edit'}' src='/images/info.gif' alt='$Lang::tr{'show root certificate'}' title='$Lang::tr{'show root certificate'}' width='20' height='20' border='0' />
-               </td></form>
-               <form method='post' name='frmrootcrtb'><td width='3%' align='center' $col1>
+                       </form>
+                       <form method='post' name='frmrootcrtb'><td width='3%' align='center' $col1>
                        <input type='image' name='$Lang::tr{'download root certificate'}' src='/images/media-floppy.png' alt='$Lang::tr{'download root certificate'}' title='$Lang::tr{'download root certificate'}' border='0' />
                        <input type='hidden' name='ACTION' value='$Lang::tr{'download root certificate'}' />
-               </td></form>
-               <td width='4%' $col1>&nbsp;</td></tr>
+                       </form>
+                       <td width='4%' $col1>&nbsp;</td>
+               </tr>
 END
                ;
     } else {
@@ -5256,7 +5294,8 @@ END
                <tr>
                        <td class='base' $col1>$Lang::tr{'root certificate'}:</td>
                        <td class='base' $col1>$Lang::tr{'not present'}</td>
-                       <td colspan='3' $col1>&nbsp;</td></tr>
+                       <td colspan='3' $col1>&nbsp;</td>
+               </tr>
 END
                ;
     }
@@ -5272,15 +5311,16 @@ END
                <tr>
                        <td class='base' $col2>$Lang::tr{'host certificate'}</td>
                        <td class='base' $col2>$hostsubject</td>
-               <form method='post' name='frmhostcrta'><td width='3%' align='center' $col2>
+                       <form method='post' name='frmhostcrta'><td width='3%' align='center' $col2>
                        <input type='hidden' name='ACTION' value='$Lang::tr{'show host certificate'}' />
                        <input type='image' name='$Lang::tr{'show host certificate'}' src='/images/info.gif' alt='$Lang::tr{'show host certificate'}' title='$Lang::tr{'show host certificate'}' width='20' height='20' border='0' />
-               </td></form>
-               <form method='post' name='frmhostcrtb'><td width='3%' align='center' $col2>
+                       </form>
+                       <form method='post' name='frmhostcrtb'><td width='3%' align='center' $col2>
                        <input type='image' name="$Lang::tr{'download host certificate'}" src='/images/media-floppy.png' alt="$Lang::tr{'download host certificate'}" title="$Lang::tr{'download host certificate'}" border='0' />
                        <input type='hidden' name='ACTION' value="$Lang::tr{'download host certificate'}" />
-               </td></form>
-               <td width='4%' $col2>&nbsp;</td></tr>
+                       </td></form>
+                       <td width='4%' $col2>&nbsp;</td>
+               </tr>
 END
                ;
     } else {
@@ -5289,7 +5329,8 @@ END
                <tr>
                        <td width='25%' class='base' $col2>$Lang::tr{'host certificate'}:</td>
                        <td class='base' $col2>$Lang::tr{'not present'}</td>
-               </td><td colspan='3' $col2>&nbsp;</td></tr>
+                       </td><td colspan='3' $col2>&nbsp;</td>
+               </tr>
 END
                ;
     }
@@ -5297,7 +5338,7 @@ END
     # Adding DH parameter to chart
     if (-f "${General::swroot}/ovpn/ca/dh1024.pem") {
                my $dhsubject = `/usr/bin/openssl dhparam -text -in ${General::swroot}/ovpn/ca/dh1024.pem`;
-               $dhsubject    =~ /PKCS#3 (.*)[\n]/;
+               $dhsubject    =~ /    (.*)[\n]/;
                $dhsubject    = $1;
 
 
@@ -5305,15 +5346,14 @@ END
                <tr>
                        <td class='base' $col3>$Lang::tr{'dh parameter'}</td>
                        <td class='base' $col3>$dhsubject</td>
-               <form method='post' name='frmdhparam'><td width='3%' align='center' $col3>
+                       <form method='post' name='frmdhparam'><td width='3%' align='center' $col3>
                        <input type='hidden' name='ACTION' value='$Lang::tr{'show dh'}' />
                        <input type='image' name='$Lang::tr{'show dh'}' src='/images/info.gif' alt='$Lang::tr{'show dh'}' title='$Lang::tr{'show dh'}' width='20' height='20' border='0' />
-               </td></form>
-               <form method='post' name='frmdhparam'><td width='3%' align='center' $col3>
-                       <input type='image' name="$Lang::tr{'download dh parameter'}" src='/images/media-floppy.png' alt="$Lang::tr{'download dh parameter'}" title="$Lang::tr{'download dh parameter'}" border='0' />
-                       <input type='hidden' name='ACTION' value="$Lang::tr{'download dh parameter'}" />
-               </td></form>
-               <td width='4%' $col3>&nbsp;</td></tr>
+                       </form>
+                       <form method='post' name='frmdhparam'><td width='3%' align='center' $col3>
+                       </form>
+                       <td width='4%' $col3>&nbsp;</td>
+               </tr>
 END
                ;
     } else {
@@ -5322,7 +5362,42 @@ END
                <tr>
                        <td width='25%' class='base' $col3>$Lang::tr{'dh parameter'}:</td>
                        <td class='base' $col3>$Lang::tr{'not present'}</td>
-               </td><td colspan='3' $col3>&nbsp;</td></tr>
+                       </td><td colspan='3' $col3>&nbsp;</td>
+               </tr>
+END
+               ;
+    }
+
+    # Adding ta.key to chart
+    if (-f "${General::swroot}/ovpn/certs/ta.key") {
+               my $tasubject = `/bin/cat ${General::swroot}/ovpn/certs/ta.key`;
+               $tasubject    =~ /# (.*)[\n]/;
+               $tasubject    = $1;
+               print <<END;
+
+               <tr>
+                       <td class='base' $col4>$Lang::tr{'ta key'}</td>
+                       <td class='base' $col4>$tasubject</td>
+                       <form method='post' name='frmtakey'><td width='3%' align='center' $col4>
+                       <input type='hidden' name='ACTION' value='$Lang::tr{'show tls-auth key'}' />
+                       <input type='image' name='$Lang::tr{'edit'}' src='/images/info.gif' alt='$Lang::tr{'show tls-auth key'}' title='$Lang::tr{'show tls-auth key'}' width='20' height='20' border='0' />
+                       </form>
+                       <form method='post' name='frmtakey'><td width='3%' align='center' $col4>
+                       <input type='image' name='$Lang::tr{'download tls-auth key'}' src='/images/media-floppy.png' alt='$Lang::tr{'download tls-auth key'}' title='$Lang::tr{'download tls-auth key'}' border='0' />
+                       <input type='hidden' name='ACTION' value='$Lang::tr{'download tls-auth key'}' />
+                       </form>
+                       <td width='4%' $col4>&nbsp;</td>
+               </tr>
+END
+               ;
+    } else {
+               # Nothing
+               print <<END;
+               <tr>
+                       <td width='25%' class='base' $col4>$Lang::tr{'ta key'}:</td>
+                       <td class='base' $col4>$Lang::tr{'not present'}</td>
+                       <td colspan='3' $col4>&nbsp;</td>
+               </tr>
 END
                ;
     }
@@ -5385,6 +5460,9 @@ END
        <hr size='1'>
        <form method='post' enctype='multipart/form-data'>
        <table width='100%' border='0'cellspacing='1' cellpadding='0'>
+       <tr>
+               <td class'base'><b>$Lang::tr{'upload ca certificate'}</b></td>
+       </tr>
        <tr>
                <td class='base' nowrap='nowrap'>$Lang::tr{'ca name'}:</td>
                <td nowrap='nowrap'><input type='text' name='CA_NAME' value='$cgiparams{'CA_NAME'}' size='15' align='left'/></td>
index c604ef05a97a5cb5d2b299ff91c9c0717f71e32d..ae4d69491218e2458a15130596a787c491755edf 100644 (file)
 'ccd used' => 'Genutzte Adressen',
 'cert' => 'Zertifikat',
 'certificate' => 'Zertifikat',
-'certificate authorities' => 'Zertifizierungsstellen (CAs)',
+'certificate authorities' => 'Zertifizierungsstellen und -Schlüssel',
 'certificate does not have a valid ca associated with it' => 'Mit dem Zertifikat ist keine gültige CA verbunden.',
 'certificate file move failed' => 'Verschieben der Zertifikatsdatei fehlgeschlagen',
 'cfg restart' => 'Nach dem Wiederherstellen eines Konfigurationsarchivs wird ein Neustart empfohlen.',
 'connection' => 'Verbindung',
 'connection closed' => 'Nicht Verbunden...',
 'connection debugging' => 'Verbindungs-Debugging',
-'connection status and controlc' => 'Verbindungsstatus und -kontrolle',
+'connection status and controlc' => 'Verbindungsstatus und -Kontrolle',
 'connection tracking' => 'iptables-Verbindungsverfolgung',
 'connection type' => 'Verbindungstyp',
 'connection type is invalid' => 'Verbindungstyp ist ungültig',
 'downlink std class' => 'Downloadstandardklasse',
 'download' => 'herunterladen',
 'download ca certificate' => 'CA-Zertifikat herunterladen',
-'download certificate' => 'Zertifikate herunterladen',
+'download certificate' => 'Datei herunterladen',
 'download dh parameter' => 'Diffie-Hellman-Parameter herunterladen',
 'download host certificate' => 'Host-Zertifikat herunterladen',
 'download new ruleset' => 'Neuen Regelsatz herunterladen',
 'download pkcs12 file' => 'PKCS12-Datei herunterladen',
 'download root certificate' => 'Root-Zertifikat herunterladen',
+'download tls-auth key' => 'tls-auth Key herunterladen',
 'dpd action' => 'Aktion für Dead Peer Detection',
 'dpd delay' => 'Verzögerung',
 'dpd timeout' => 'Zeitüberschreitung',
 'ovpn device' => 'OpenVPN-Gerät',
 'ovpn dh' => 'Diffie-Hellman-Parameter-Länge',
 'ovpn dh new key' => 'Neuen Diffie-Hellman Parameter erstellen',
-'ovpn dh parameters' => 'Diffie-Hellman-Parameter-Optionen',
+'ovpn dh parameters' => 'Diffie-Hellman-Parameter Optionen',
 'ovpn dh upload' => 'Neuen Diffie-Hellman-Parameter hochladen',
 'ovpn dl' => 'OVPN-Konfiguration downloaden',
 'ovpn engines' => 'Krypto Engine',
 'shares' => 'Freigaben',
 'show ajax speedmeter in footer' => 'Ajax Speed Anzeige',
 'show ca certificate' => 'CA Zertifikat anzeigen',
-'show certificate' => 'Zertifikat anzeigen',
+'show certificate' => 'Datei anzeigen',
 'show crl' => 'Certificate Revocation List anzeigen',
 'show dh' => 'Diffie-Hellman-Parameter anzeigen',
 'show host certificate' => 'Host-Zertifikat anzeigen',
 'time server' => 'Zeitserver',
 'timeout must be a number' => 'Wartezeit muss eine Zahl sein.',
 'title' => 'Titel',
+'ta key' => 'TLS-Authentifizierungsschlüssel',
 'to' => 'Bis',
 'to email adr' => 'An Email Adresse',
 'to install an update' => 'Um ein Update zu installieren, laden Sie zuerst die folgende .tgz.gpg Datei hoch:',
index 5a5c1c3553974c46b8e2b6b891e16c7233af773d..b1cfa831054b483c261e1d55fc74eb959aea2173 100644 (file)
 'ccd used' => 'Used addresses',
 'cert' => 'Certificate',
 'certificate' => 'Certificate',
-'certificate authorities' => 'Certificate Authorities',
+'certificate authorities' => 'Certificate Authorities and -Keys',
 'certificate does not have a valid ca associated with it' => 'Certificate does not have a valid CA associated with it.',
 'certificate file move failed' => 'Certificate file move failed',
 'cfg restart' => 'A reboot is suggested after restoring a configuration archive.',
 'connection' => 'Connection',
 'connection closed' => 'Not connected...',
 'connection debugging' => 'Connection debugging',
-'connection status and controlc' => 'Connection status and control',
+'connection status and controlc' => 'Connection Status and -Control',
 'connection tracking' => 'iptables Connection Tracking',
 'connection type' => 'Connection Type',
 'connection type is invalid' => 'Connection type is invalid.',
 'downlink std class' => 'downlink standard class',
 'download' => 'download',
 'download ca certificate' => 'Download CA certificate',
-'download certificate' => 'Download certificate',
+'download certificate' => 'Download file',
 'download dh parameter' => 'Download Diffie-Hellman parameters',
 'download host certificate' => 'Download host certificate',
 'download new ruleset' => 'Download new ruleset',
 'download pkcs12 file' => 'Download PKCS12 file',
 'download root certificate' => 'Download root certificate',
+'download tls-auth key' => 'Download tls-auth key',
 'dpd action' => 'Action',
 'dpd delay' => 'Delay',
 'dpd timeout' => 'Timeout',
 'generating the root and host certificates may take a long time. it can take up to several minutes on older hardware. please be patient' => 'Generating the root and host certificates may take a long time.  It can take up to several minutes on older hardware. Please be patient.',
 'genkey' => 'Generate PSK',
 'genre' => 'Genre',
-'global settings' => 'Global settings',
+'global settings' => 'Global Settings',
 'gpl i accept these terms and conditions' => 'I accept these terms and conditions',
 'gpl license agreement' => 'License Agreement',
 'gpl please read carefully the general public license and accept it below' => 'Please read carefully the General Public License and accept it below',
 'show ajax speedmeter in footer' => 'Show Ajax speedmeter',
 'show areas' => 'show areas',
 'show ca certificate' => 'Show CA certificate',
-'show certificate' => 'Show certificate',
+'show certificate' => 'Show file',
 'show crl' => 'Show certificate revocation list',
 'show dh' => 'Show Diffie-Hellman parameters',
 'show host certificate' => 'Show host certificate',
 'show lines' => 'Show lines',
 'show root certificate' => 'Show root certificate',
 'show share options' => 'Show shares options',
+'show tls-auth key' => 'Show tls-auth key',
 'shuffle' => 'Shuffle',
 'shutdown' => 'Shutdown',
 'shutdown ask' => 'Shutdown?',
 'system log viewer' => 'System Log Viewer',
 'system logs' => 'System Logs',
 'system status information' => 'System Status Information',
+'ta key' => 'TLS-Authentification-Key',
 'telephone not set' => 'Telephone not set.',
 'template' => 'Preset',
 'template warning' => 'You have two options to set up Qos. The First, you press the save button and generate the classes and rules on your own. The second, you press the preset button and classes and rules will be set up by a template.',