Handle hostnames with upper-case letters
[webmin.git] / ipsec / showkey.cgi
1 #!/usr/local/bin/perl
2 # showkey.cgi
3 # Show this host's public key in a format suitable for inclusion in the config
4 # file of another host
5
6 require './ipsec-lib.pl';
7 &ui_print_header(undef, $text{'showkey_title'}, "");
8
9 print "$text{'showkey_desc1'}<p>\n";
10 print "<tt>",join("<br>", &wrap_lines(&get_public_key(), 80)),"</tt><p>\n";
11
12 print "$text{'showkey_desc2'}<p>\n";
13 ($flags, $proto, $alg, $key) = &get_public_key_dns();
14 print "<table>\n";
15 print "<tr> <td><b>$text{'showkey_flags'}</b></td> <td>$flags</td> </tr>\n";
16 print "<tr> <td><b>$text{'showkey_proto'}</b></td> <td>$proto</td> </tr>\n";
17 print "<tr> <td><b>$text{'showkey_alg'}</b></td> <td>$alg</td> </tr>\n";
18 print "<tr> <td valign=top><b>$text{'showkey_key'}</b></td> <td><tt>",
19         join("<br>", &wrap_lines($key, 80)),"</tt></td> </tr>\n";
20 print "</table>\n";
21
22 &ui_print_footer("", $text{'index_return'});
23