]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Update stream_ssl.tdir test to also use the new forward-host notation.
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Wed, 2 Feb 2022 11:54:09 +0000 (12:54 +0100)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Wed, 2 Feb 2022 11:55:29 +0000 (12:55 +0100)
doc/Changelog
testdata/stream_ssl.tdir/stream_ssl.clie.conf
testdata/stream_ssl.tdir/stream_ssl.serv.conf
testdata/stream_ssl.tdir/stream_ssl.test

index b978e1da78fd256e44ead622ba09e6cf5d2e9c3a..dd405b1cf8f880170c500617e842691b22b835e9 100644 (file)
@@ -5,6 +5,7 @@
        - Change aggressive-nsec default to yes.
        - Merge PR #617: Update stub/forward-host notation to accept port and
          tls-auth-name.
+       - Update stream_ssl test to also use the new forward-host notation.
 
 1 February 2022: George
        - Merge PR #603 from fobser: Use OpenSSL 1.1 API to access DSA and RSA
index 4643c6d554fb28a482e5f0786002340bdd6c76e7..923ab1fb51714ecee4309558a46557d3212da6c9 100644 (file)
@@ -16,3 +16,7 @@ server:
 forward-zone:
        name: "."
        forward-addr: "127.0.0.1@@SERVPORT@#unbound"
+
+forward-zone:
+       name: "test.host."
+       forward-host: "unbound.server@@SERVPORT@#unbound"
index c77e39fc5d594df0d61fec1f205681c2c599dfef..a5dfcf364ec315d2d60ab8dd9aca74846039d5a6 100644 (file)
@@ -10,6 +10,8 @@ server:
        username: ""
        do-not-query-localhost: yes
        local-data: "www.example.com. IN A 10.20.30.40"
+       local-data: "unbound.server. IN A 127.0.0.1"
+       local-data: "test.host. IN A 1.2.3.4"
        ssl-port: @SERVPORT@
        ssl-service-key: "unbound_server.key"
        ssl-service-pem: "unbound_server.pem"
index b5bc2d911b6228f22e90a91527687e9683663699..39972a844d212b069766896a6a9740f6f4062286 100644 (file)
@@ -73,4 +73,38 @@ else
        exit 1
 fi
 
+rm -f outfile
+
+# test client unbound (no SSL towards it, but it does SSL to the SSL service)
+# test that forward-host notation also works.
+echo "> dig test.host. A IN"
+dig @127.0.0.1 -p $CLIE_PORT test.host. >outfile 2>&1
+if test "$?" -ne 0; then
+       echo "exit status not OK"
+       echo "> cat logfiles"
+       cat outfile
+       echo "SSLSERVICE"
+       cat unboundserv.log
+       echo "SSLCLIENT"
+       cat unboundclie.log
+       echo "Not OK"
+       exit 1
+else
+       echo "exit status OK"
+fi
+echo "> cat logfiles"
+cat outfile
+echo "SSLSERVICE"
+cat unboundserv.log
+echo "SSLCLIENT"
+cat unboundclie.log
+echo "> check answer"
+if grep "1.2.3.4" outfile; then
+       echo "OK"
+else
+       echo "Not OK"
+       exit 1
+fi
+
+rm -f outfile
 exit 0