"Fossies" - the Fresh Open Source Software Archive

Member "hitch-1.5.2/src/tests/test14-ocsp-vfy.sh" (27 Aug 2019, 1191 Bytes) of package /linux/www/hitch-1.5.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. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "test14-ocsp-vfy.sh": 1.4.6_vs_1.4.8.

    1 #!/bin/sh
    2 
    3 . hitch_test.sh
    4 
    5 unset SSL_CERT_DIR
    6 unset SSL_CERT_FILE
    7 
    8 cat >hitch1.cfg <<EOF
    9 backend = "[hitch-tls.org]:80"
   10 
   11 frontend = {
   12   host = "localhost"
   13   port = "$LISTENPORT"
   14 }
   15 
   16 pem-file = {
   17      cert = "$CERTSDIR/valid.example.com"
   18      ocsp-resp-file = "$CERTSDIR/valid.example.com.ocsp"
   19      ocsp-verify-staple = on
   20 }
   21 EOF
   22 
   23 run_cmd -s 1 hitch --test --config=hitch1.cfg
   24 
   25 export SSL_CERT_FILE=$CERTSDIR/valid.example.com-ca-chain.pem
   26 run_cmd hitch --test --config=hitch1.cfg
   27 
   28 unset SSL_CERT_FILE
   29 
   30 cat >hitch2.cfg <<EOF
   31 backend = "[hitch-tls.org]:80"
   32 
   33 frontend = {
   34   host = "localhost"
   35   port = "$LISTENPORT"
   36 }
   37 
   38 pem-file = {
   39      cert = "$CERTSDIR/valid.example.com"
   40      ocsp-resp-file = "$CERTSDIR/valid.example.com.ocsp"
   41      ocsp-verify-staple = off
   42 }
   43 EOF
   44 
   45 run_cmd hitch --test --config=hitch2.cfg
   46 
   47 # Test that timeouts are valid configuration file entries. Actually
   48 # testing the timeouts will be complicated and is deemed unnecessary for now.
   49 cat >hitch3.cfg <<EOF
   50 backend = "[hitch-tls.org]:80"
   51 
   52 frontend = {
   53   host = "localhost"
   54   port = "$LISTENPORT"
   55 }
   56 
   57 pem-file = {
   58      cert = "$CERTSDIR/valid.example.com"
   59 }
   60 
   61 ocsp-connect-tmo = 10
   62 ocsp-resp-tmo = 10
   63 EOF
   64 
   65 run_cmd hitch --test --config=hitch3.cfg