Added fields to the Index Page Options page to control the display of Webmin and module updates.
Moved settings related to Webmin's built-in webserver to the new Web Server Options page.
The client-side expiry time for static files served by Webmin can now be configured on the Web Server Options page, and can be customized on a per-file basis.
+A chained certificate file supplied by a CA can now be easily uploaded using the Upload certificate tab on the SSL Encryption page.
print &ui_table_start($text{'ssl_saveheader'}, undef, 2);
print &ui_table_row($text{'ssl_privkey'},
- &ui_textarea("key", undef, 7, 60)."<br>\n".
+ &ui_textarea("key", undef, 7, 70)."<br>\n".
"<b>$text{'ssl_upload'}</b>\n".
&ui_upload("keyfile"));
&ui_radio("cert_def", 1,
[ [ 1, $text{'ssl_same'} ],
[ 0, $text{'ssl_below'} ] ])."<br>\n".
- &ui_textarea("cert", undef, 7, 60)."<br>\n".
+ &ui_textarea("cert", undef, 7, 70)."<br>\n".
"<b>$text{'ssl_upload'}</b>\n".
&ui_upload("certfile"));
+print &ui_table_row($text{'ssl_privchain'},
+ &ui_radio("chain_def", 1,
+ [ [ 1, $miniserv{'extracas'} ? $text{'ssl_leavechain'}
+ : $text{'ssl_nochain'} ],
+ [ 0, $text{'ssl_below'} ] ])."<br>\n".
+ &ui_textarea("chain", undef, 7, 70)."<br>\n".
+ "<b>$text{'ssl_upload'}</b>\n".
+ &ui_upload("chainfile"));
+
print &ui_table_end();
print &ui_form_end([ [ "save", $text{'save'} ] ]);
print &ui_tabs_end_tab();
ssl_saveheader=Upload existing key
ssl_privkey=Private key text
ssl_privcert=Certificate text
+ssl_privchain=Chained certificate text
+ssl_nochain=No chained certificate
+ssl_leavechain=Use existing chained certificate
ssl_upload=Or from upload file
ssl_same=Combined with private key
ssl_below=Entered below ..
savekey_ekey=Missing or invalid PEM format key
savekey_ecert=Missing or invalid PEM format certificate
savekey_ecert2=Missing or invalid PEM format key and certificate
+savekey_echain=Missing or invalid PEM format chained certificate
savekey_title=Upload Existing Key
savekey_done2=The supplied SSL key has been saved in $1, and the certificate in $2.
savekey_done=The supplied SSL key and certitifcate have been saved in the file $1.
+savekey_done3=The supplied chained SSL certificate has been saved in the file $1.
cache_title=Cached URLs
cache_search=Find URLs containing:
$key =~ /BEGIN CERTIFICATE/ &&
$key =~ /END CERTIFICATE/ || &error($text{'savekey_ecert2'});
}
+if (!$in{'chain_def'}) {
+ # Make sure chained cert is valid
+ $chain = $in{'chain'} || $in{'chainfile'};
+ $chain =~ s/\r//g;
+ $chain =~ /BEGIN CERTIFICATE/ &&
+ $chain =~ /END CERTIFICATE/ || &error($text{'savekey_echain'});
+ }
# Save config and key file
&lock_file($ENV{'MINISERV_CONFIG'});
&close_tempfile(CERT);
&unlock_file($miniserv{'certfile'});
}
+if (!$in{'chain_def'}) {
+ $miniserv{'extracas'} = "$config_directory/miniserv.chain"
+ if (!$miniserv{'extracas'} || $miniserv{'extracas'} =~ /\s/);
+ &lock_file($miniserv{'extracas'});
+ &open_tempfile(CERT, ">$miniserv{'extracas'}");
+ &print_tempfile(CERT, $chain);
+ &close_tempfile(CERT);
+ &unlock_file($miniserv{'extracas'});
+ }
&put_miniserv_config(\%miniserv);
&unlock_file($ENV{'MINISERV_CONFIG'});
else {
print &text('savekey_done', "<tt>$miniserv{'keyfile'}</tt>"),"<p>\n";
}
+if (!$in{'chain_def'}) {
+ print &text('savekey_done3', "<tt>$miniserv{'extracas'}</tt>"),"<p>\n";
+ }
&ui_print_footer("", $text{'index_return'});