"Fossies" - the Fresh Open Source Software Archive

Member "hitch-1.7.2/src/tests/test04-listen-with-own-certs.sh" (29 Nov 2021, 655 Bytes) of package /linux/www/hitch-1.7.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "test04-listen-with-own-certs.sh": 1.7.0_vs_1.7.2.

    1 #!/bin/sh
    2 #
    3 # Test multiple listening sockets, each with their own certificate.
    4 #
    5 . hitch_test.sh
    6 
    7 PORT2=$(expr $$ % 60000 + 4000)
    8 
    9 start_hitch \
   10     --backend='[hitch-tls.org]:80' \
   11     --frontend="[localhost]:$LISTENPORT+${CERTSDIR}/site1.example.com" \
   12     --frontend="[localhost]:$PORT2+${CERTSDIR}/site2.example.com" \
   13     "${CERTSDIR}/default.example.com"
   14 
   15 s_client -connect localhost:$LISTENPORT >s_client1.dump
   16 subject_field_eq CN site1.example.com s_client1.dump
   17 
   18 # Second listen port.
   19 s_client -connect localhost:$PORT2 >s_client2.dump
   20 subject_field_eq CN site2.example.com s_client2.dump
   21 
   22 for host in $(hitch_hosts)
   23 do
   24     curl_hitch -- "https://$host/"
   25 done