diff --git a/bind8/conf_net.cgi b/bind8/conf_net.cgi index a826f5bd6..1417262eb 100755 --- a/bind8/conf_net.cgi +++ b/bind8/conf_net.cgi @@ -30,10 +30,19 @@ my $ltable = &ui_radio("listen_def", @listen ? 0 : 1, my @table = ( ); push(@listen, { }); +my @tls = map { $_->{'values'}->[0] } &find("tls", $conf); for(my $i=0; $i<@listen; $i++) { my $l = $listen[$i]; - my $port = $l->{'value'} eq 'port' ? - $l->{'values'}->[1] : undef; + my $v = $l->{'values'} || []; + my ($port, $tls); + for(my $j=0; $j<@$v; $j++) { + if ($v->[$j] eq "port") { + $port = $v->[++$j]; + } + if ($v->[$j] eq "tls") { + $tls = $v->[++$j]; + } + } my @vals = map { $_->{'name'} } @{$l->{'members'}}; push(@table, [ &ui_select("proto_$i", @@ -45,11 +54,15 @@ for(my $i=0; $i<@listen; $i++) { &ui_radio("pdef_$i", $port ? 0 : 1, [ [ 1, $text{'default'} ], [ 0, &ui_textbox("port_$i", $port, 5) ] ]), + @tls ? ( &ui_select("tls_$i", $tls, [ '', @tls ]) ) : ( ), &ui_textbox("addrs_$i", join(" ", @vals), 50), ]); } $ltable .= &ui_columns_table( - [ $text{'net_proto'}, $text{'net_port'}, $text{'net_addrs'} ], + [ $text{'net_proto'}, + $text{'net_port'}, + @tls ? ( $text{'net_tls'} ) : ( ), + $text{'net_addrs'} ], undef, \@table, undef, diff --git a/bind8/lang/en b/bind8/lang/en index 59bd76cda..99851dc29 100644 --- a/bind8/lang/en +++ b/bind8/lang/en @@ -733,6 +733,7 @@ net_ip=IP address net_sport=Source port for queries net_port=Port number net_proto=Protocol +net_tls=SSL Key net_none=<None> net_topol=Nameserver choice topology net_recur=Allow recursive queries from diff --git a/bind8/save_net.cgi b/bind8/save_net.cgi index 26d4144d8..f13eaa815 100755 --- a/bind8/save_net.cgi +++ b/bind8/save_net.cgi @@ -24,11 +24,15 @@ if (!$in{'listen_def'}) { next if (!$in{"proto_$i"}); my $l = { 'name' => $in{"proto_$i"} eq 'v6' ? 'listen-on-v6' : 'listen-on', + 'values' => [ ], 'type' => 1 }; if (!$in{"pdef_$i"}) { $in{"port_$i"} =~ /^\d+$/ || &error(&text('net_eport', $in{"port_$i"})); - $l->{'values'} = [ 'port', $in{"port_$i"} ]; + push(@{$l->{'values'}}, 'port', $in{"port_$i"}); + } + if ($in{"tls_$i"}) { + push(@{$l->{'values'}}, 'tls', $in{"tls_$i"}); } my $port = $in{"pdef_$i"} ? 53 : $in{"port_$i"}; $used{$port,$l->{'name'}}++ &&