Add support for EC SSL cert and key file directives

https://github.com/webmin/webmin/issues/2597
This commit is contained in:
Jamie Cameron
2026-01-04 13:33:51 -08:00
parent f3dda46138
commit 191d8a255c
2 changed files with 50 additions and 6 deletions

View File

@@ -388,13 +388,17 @@ mod_tls_required=SSL required?
mod_tls_ctrl=For control channel
mod_tls_auth=For authentication
mod_tls_authdata=For authentication and data
mod_tls_file=SSL certificate file
mod_tls_efile=SSL certificate file does not exist!
mod_tls_key=SSL key file
mod_tls_ekey=SSL key file does not exist!
mod_tls_file=RSA SSL certificate file
mod_tls_efile=RSA SSL certificate file does not exist!
mod_tls_key=RSA SSL key file
mod_tls_ekey=RSA SSL key file does not exist!
mod_tls_ca=SSL CA certificate file
mod_tls_eca=SSL CA certificate file does not exist!
mod_tls_none=None set
mod_tls_ecfile=EC SSL certificate file
mod_tls_eecfile=EC SSL certificate file does not exist!
mod_tls_eckey=EC SSL key file
mod_tls_eeckey=EC SSL key file does not exist!
start_err=Failed to start FTP server
start_einetd=You cannot start the server daemon when in inetd mode.

View File

@@ -3,10 +3,12 @@ sub mod_tls_directives
{
local $rv = [
[ 'TLSEngine', 0, 7, 'virtual root', 1.27, 10 ],
[ 'TLSRequired', 0, 7, 'virtual root', 1.27, 1 ],
[ 'TLSRequired', 0, 7, 'virtual root', 1.27, 9 ],
[ 'TLSRSACertificateFile', 0, 7, 'virtual root', 1.27, 8 ],
[ 'TLSRSACertificateKeyFile', 0, 7, 'virtual root', 1.27, 7 ],
[ 'TLSCACertificateFile', 0, 7, 'virtual root', 1.27, 6 ],
[ 'TLSCACertificateFile', 0, 7, 'virtual root', 1.27, 5 ],
[ 'TLSECCertificateFile', 0, 7, 'virtual root', 1.35, 4 ],
[ 'TLSECCertificateKeyFile', 0, 7, 'virtual root', 1.35, 3 ],
];
return &make_directives($rv, $_[0], "mod_tls");
}
@@ -95,4 +97,42 @@ else {
}
}
sub edit_TLSECCertificateFile
{
my $n = $_[1]->{'name'};
return (2, $text{'mod_tls_ecfile'},
&ui_opt_textbox($n, $_[0]->{'value'}, 60, $text{'mod_tls_none'})." ".
&file_chooser_button($n));
}
sub save_TLSECCertificateFile
{
my $n = $_[0]->{'name'};
if ($in{$n."_def"}) {
return ( [ ] );
}
else {
-r $in{$n} || &error($text{'mod_tls_eecfile'});
return ( [ $in{$n} ] );
}
}
sub edit_TLSECCertificateKeyFile
{
my $n = $_[1]->{'name'};
return (2, $text{'mod_tls_eckey'},
&ui_opt_textbox($n, $_[0]->{'value'}, 60, $text{'mod_tls_none'})." ".
&file_chooser_button($n));
}
sub save_TLSECCertificateKeyFile
{
my $n = $_[0]->{'name'};
if ($in{$n."_def"}) {
return ( [ ] );
}
else {
-r $in{$n} || &error($text{'mod_tls_eeckey'});
return ( [ $in{$n} ] );
}
}
1;