mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 23:36:58 +00:00
pveproxy: add configurable HONOR_CIPHER_ORDER
fix #2069 (the report includes rationale and also information on test-cases). Tested by: * running testssl.sh [0] * enabling this setting (our default cipherlist prefers AES256, chromium on stretch AES128) Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
parent
bbb0c700bd
commit
1f7809624b
@ -222,6 +222,7 @@ sub read_proxy_config {
|
||||
$shcmd .= 'echo \"POLICY:\$POLICY\";';
|
||||
$shcmd .= 'echo \"CIPHERS:\$CIPHERS\";';
|
||||
$shcmd .= 'echo \"DHPARAMS:\$DHPARAMS\";';
|
||||
$shcmd .= 'echo \"HONOR_CIPHER_ORDER:\$HONOR_CIPHER_ORDER\";';
|
||||
|
||||
my $data = -f $conffile ? `bash -c "$shcmd"` : '';
|
||||
|
||||
@ -229,7 +230,7 @@ sub read_proxy_config {
|
||||
|
||||
while ($data =~ s/^(.*)\n//) {
|
||||
my ($key, $value) = split(/:/, $1, 2);
|
||||
next if !$value;
|
||||
next if !defined($value) || $value eq '';
|
||||
if ($key eq 'ALLOW_FROM' || $key eq 'DENY_FROM') {
|
||||
my $ips = [];
|
||||
foreach my $ip (split(/,/, $value)) {
|
||||
@ -244,6 +245,9 @@ sub read_proxy_config {
|
||||
$res->{$key} = $value;
|
||||
} elsif ($key eq 'DHPARAMS') {
|
||||
$res->{$key} = $value;
|
||||
} elsif ($key eq 'HONOR_CIPHER_ORDER') {
|
||||
die "unknown value '$value' - use 0 or 1\n" if $value !~ m/^(0|1)$/;
|
||||
$res->{$key} = $value;
|
||||
} else {
|
||||
# silently skip everythin else?
|
||||
}
|
||||
|
@ -109,6 +109,7 @@ sub init {
|
||||
cipher_list => $proxyconf->{CIPHERS} || 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256',
|
||||
key_file => '/etc/pve/local/pve-ssl.key',
|
||||
cert_file => '/etc/pve/local/pve-ssl.pem',
|
||||
honor_cipher_order => $proxyconf->{HONOR_CIPHER_ORDER},
|
||||
},
|
||||
# Note: there is no authentication for those pages and dirs!
|
||||
pages => {
|
||||
|
Loading…
Reference in New Issue
Block a user