Changeset 9a834cc in mod_gnutls


Ignore:
Timestamp:
Nov 28, 2018, 10:23:49 AM (11 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
debian/master, master
Children:
5c56e5b
Parents:
6519eb9 (diff), afebb9b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge gnutls-cli version check

Thanks Krista!

Location:
test
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • test/common.bash

    r6519eb9 r9a834cc  
    101101    return 0
    102102}
     103
     104# Usage: require_gnutls_cli ${REQUIRED_VERSION_NUMBER} || exit ${ERROR_CODE}
     105# Require the gnutls-cli binary to be of a given version or newer.
     106# Return error code 1 if older, 2 if not found.
     107function require_gnutls_cli
     108{
     109    local required_version=(${1//./ })
     110
     111    if [[ $(gnutls-cli --version) =~ gnutls-cli[[:space:]]([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+) ]]
     112    then
     113        for i in {0..2}
     114        do
     115            if [ ${BASH_REMATCH[i+1]} -gt ${required_version[i]} ]
     116            then
     117                break;
     118            elif [ ${BASH_REMATCH[i+1]} -lt ${required_version[i]} ]
     119            then
     120                return 1
     121            fi
     122        done
     123        return 0
     124    else
     125        return 2
     126    fi
     127}
  • test/test-31_vhost_SNI_serveralias_match.bash

    r6519eb9 r9a834cc  
    11#!/bin/bash
     2set -e
     3: ${srcdir:="."}
     4. ${srcdir}/common.bash
     5
     6require_gnutls_cli 3.5.12 || (echo "Using --sni-hostname requires gnutls-cli version 3.5.12 or newer"; exit 77)
    27${srcdir}/runtests t-31
  • test/test-32_vhost_SNI_serveralias_mismatch.bash

    r6519eb9 r9a834cc  
    11#!/bin/bash
     2set -e
     3: ${srcdir:="."}
     4. ${srcdir}/common.bash
     5
     6require_gnutls_cli 3.5.12 || (echo "Using --sni-hostname requires gnutls-cli version 3.5.12 or newer"; exit 77)
    27${srcdir}/runtests t-32
  • test/test-33_vhost_SNI_serveralias_missinghost.bash

    r6519eb9 r9a834cc  
    11#!/bin/bash
     2set -e
     3: ${srcdir:="."}
     4. ${srcdir}/common.bash
     5
     6require_gnutls_cli 3.5.12 || (echo "Using --sni-hostname requires gnutls-cli version 3.5.12 or newer"; exit 77)
    27${srcdir}/runtests t-33
Note: See TracChangeset for help on using the changeset viewer.