source: mod_gnutls/test/test-30_ip_based_vhosts.bash @ 1835eba

debian/master debian/0.9.0-1
Last change on this file since 1835eba was 0062ede, checked in by Fiona Klute <fiona.klute@…>, 14 months ago

Test for IP-based virtual hosts

Mostly to make sure the new "same vhost" check for TLS connection and
request works correctly with IP-based virtual hosts.

  • Property mode set to 100755
File size: 602 bytes
Line 
1#!/bin/bash
2
3# Parse TEST_IP into an array
4declare -a addrs=(${TEST_IP})
5if [ ${#addrs[@]} -lt 2 ]; then
6    echo "This test needs two or more IP addresses in TEST_IP," \
7         "check ./configure options!"
8    exit 77
9fi
10
11# The two virtual hosts have different IPs, so we can check if
12# selection without SNI works correctly. The request will go to the
13# second one.
14export VHOST1_IP="${addrs[0]}"
15export VHOST2_IP="${addrs[1]}"
16
17# gnutls-cli expects IPv6 addresses without enclosing brackets, remove
18# them
19TARGET_IP="${VHOST2_IP#\[}"
20TARGET_IP="${TARGET_IP%\]}"
21export TARGET_IP
22
23${srcdir}/runtests t-30
Note: See TracBrowser for help on using the repository browser.