gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_2_11_6-352-g004aaf2


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_11_6-352-g004aaf2
Date: Wed, 30 Mar 2011 20:25:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=004aaf22d421327e910af49367197a20b18010c0

The branch, master has been updated
       via  004aaf22d421327e910af49367197a20b18010c0 (commit)
      from  812b2900723880df67a250f18f849dfe4f2e0064 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 004aaf22d421327e910af49367197a20b18010c0
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Wed Mar 30 22:23:30 2011 +0200

    Reorganized scripts that use test servers, based on patch by Cedric 
Arbogast.

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                           |    1 +
 tests/Makefile.am                      |    2 +-
 tests/dsa/testdsa                      |   47 +++++++++-----------------------
 tests/openpgp-certs/testcerts          |   22 +++++----------
 tests/{pathlen => scripts}/Makefile.am |    7 +----
 tests/scripts/common.sh                |   26 +++++++++++++++++
 6 files changed, 49 insertions(+), 56 deletions(-)
 copy tests/{pathlen => scripts}/Makefile.am (86%)
 create mode 100644 tests/scripts/common.sh

diff --git a/configure.ac b/configure.ac
index cfea317..f7a253f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -283,6 +283,7 @@ AC_CONFIG_FILES([
   tests/Makefile
   tests/key-id/Makefile
   tests/dsa/Makefile
+  tests/scripts/Makefile
   tests/openpgp-certs/Makefile
   tests/safe-renegotiation/Makefile
   tests/pathlen/Makefile
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ae6a186..2d5e2d4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -21,7 +21,7 @@
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 SUBDIRS = . rsa-md5-collision pkcs1-padding pkcs8-decode pkcs12-decode \
-       userid pathlen key-id sha2 safe-renegotiation dsa
+       userid pathlen key-id sha2 safe-renegotiation dsa scripts
 
 if ENABLE_OPENPGP
 SUBDIRS += openpgp-certs
diff --git a/tests/dsa/testdsa b/tests/dsa/testdsa
index 910bf8b..f084055 100755
--- a/tests/dsa/testdsa
+++ b/tests/dsa/testdsa
@@ -27,10 +27,7 @@ PORT="${PORT:-5559}"
 DEBUG=""
 unset RETCODE
 
-fail() {
-   echo "Failure: $1" >&2
-   exit 1
-}
+. ../scripts/common.sh
 
 echo "Checking various DSA key sizes"
 
@@ -38,11 +35,8 @@ echo "Checking various DSA key sizes"
 
 echo "Checking DSA-1024 with TLS 1.0"
 
-$SERV $DEBUG -p $PORT --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" 
--x509certfile $srcdir/cert.dsa.1024.pem --x509keyfile $srcdir/dsa.1024.pem 
>/dev/null 2>&1 & PID=$!
-trap "kill $PID" 1 15 2
-
-# give the server a chance to initialize
-sleep 2
+launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" --x509certfile 
$srcdir/cert.dsa.1024.pem --x509keyfile $srcdir/dsa.1024.pem >/dev/null 2>&1 & 
PID=$!
+wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null || \
   fail "Failed connection to a server with DSA 1024 key and TLS 1.0!"
@@ -72,11 +66,8 @@ wait
 
 echo "Checking DSA-1024 with TLS 1.2"
 
-$SERV $DEBUG -p $PORT --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2" 
--x509certfile $srcdir/cert.dsa.1024.pem --x509keyfile $srcdir/dsa.1024.pem 
>/dev/null 2>&1 & PID=$!
-trap "kill $PID" 1 15 2
-
-# give the server a chance to initialize
-sleep 2
+launch_server $$  --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2" 
--x509certfile $srcdir/cert.dsa.1024.pem --x509keyfile $srcdir/dsa.1024.pem 
>/dev/null 2>&1 & PID=$!
+wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null || \
   fail "Failed connection to a server with DSA 1024 key and TLS 1.2!"
@@ -107,11 +98,8 @@ wait
 
 echo "Checking DSA-2048 with TLS 1.0"
 
-$SERV $DEBUG -p $PORT --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" 
--x509certfile $srcdir/cert.dsa.2048.pem --x509keyfile $srcdir/dsa.2048.pem 
>/dev/null 2>&1 & PID=$!
-trap "kill $PID" 1 15 2
-
-# give the server a chance to initialize
-sleep 2
+launch_server $$  --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" 
--x509certfile $srcdir/cert.dsa.2048.pem --x509keyfile $srcdir/dsa.2048.pem 
>/dev/null 2>&1 & PID=$!
+wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null 2>&1 && \
   fail "Succeeded connection to a server with DSA 2048 key and TLS 1.0. Should 
have failed!"
@@ -123,11 +111,8 @@ wait
 
 echo "Checking DSA-2048 with TLS 1.2"
 
-$SERV $DEBUG -p $PORT --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2" 
--x509certfile $srcdir/cert.dsa.2048.pem --x509keyfile $srcdir/dsa.2048.pem 
>/dev/null 2>&1 & PID=$!
-trap "kill $PID" 1 15 2
-
-# give the server a chance to initialize
-sleep 2
+launch_server $$  --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2" 
--x509certfile $srcdir/cert.dsa.2048.pem --x509keyfile $srcdir/dsa.2048.pem 
>/dev/null 2>&1 & PID=$!
+wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null || \
   fail "Failed connection to a server with DSA 2048 key and TLS 1.2!"
@@ -139,11 +124,8 @@ wait
 
 echo "Checking DSA-3072 with TLS 1.0"
 
-$SERV $DEBUG -p $PORT --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" 
--x509certfile $srcdir/cert.dsa.3072.pem --x509keyfile $srcdir/dsa.3072.pem 
>/dev/null 2>&1 & PID=$!
-trap "kill $PID" 1 15 2
-
-# give the server a chance to initialize
-sleep 2
+launch_server $$  --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" 
--x509certfile $srcdir/cert.dsa.3072.pem --x509keyfile $srcdir/dsa.3072.pem 
>/dev/null 2>&1 & PID=$!
+wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null 2>&1 && \
   fail "Succeeded connection to a server with DSA 2048 key and TLS 1.0. Should 
have failed!"
@@ -155,11 +137,8 @@ wait
 
 echo "Checking DSA-3072 with TLS 1.2"
 
-$SERV $DEBUG -p $PORT --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2" 
--x509certfile $srcdir/cert.dsa.3072.pem --x509keyfile $srcdir/dsa.3072.pem 
>/dev/null 2>&1 & PID=$!
-trap "kill $PID" 1 15 2
-
-# give the server a chance to initialize
-sleep 2
+launch_server $$  --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2" 
--x509certfile $srcdir/cert.dsa.3072.pem --x509keyfile $srcdir/dsa.3072.pem 
>/dev/null 2>&1 & PID=$!
+wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null || \
   fail "Failed connection to a server with DSA 3072 key and TLS 1.2!"
diff --git a/tests/openpgp-certs/testcerts b/tests/openpgp-certs/testcerts
index b100ac8..ad090bd 100755
--- a/tests/openpgp-certs/testcerts
+++ b/tests/openpgp-certs/testcerts
@@ -27,18 +27,14 @@ PORT="${PORT:-5557}"
 DEBUG=""
 unset RETCODE
 
-fail() {
-   echo "Failure: $1" >&2
-   RETCODE=${RETCODE:-${2:-1}}
-}
+. ../scripts/common.sh
 
 echo "Checking OpenPGP certificate verification"
 
-$SERV -p $PORT --pgpcertfile $srcdir/srv-public-127.0.0.1-signed.gpg 
--pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 & PID=$!
-trap "kill $PID" 1 15 2
+launch_server $$ --pgpcertfile $srcdir/srv-public-127.0.0.1-signed.gpg 
--pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 & PID=$!
+wait_server $PID
 
 # give the server a chance to initialize
-sleep 2
 
 #gnutls currently only considers PGP certificates verified only if
 #all user IDs in the certificate were signed.
@@ -55,11 +51,8 @@ $CLI $DEBUG -p $PORT localhost --pgpkeyring 
$srcdir/ca-public.gpg </dev/null >/d
 kill $PID
 wait
 
-$SERV -p $PORT --pgpcertfile $srcdir/srv-public-localhost-signed.gpg 
--pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 & PID=$!
-trap "kill $PID" 1 15 2
-
-# give the server a chance to initialize
-sleep 2
+launch_server $$ --pgpcertfile $srcdir/srv-public-localhost-signed.gpg 
--pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 & PID=$!
+wait_server $PID
 
 echo | $CLI $DEBUG -p $PORT 127.0.0.1 --pgpkeyring $srcdir/ca-public.gpg 
</dev/null >/dev/null 2>&1 && \
   fail "Connection to unverified IP address should have failed! (error code 
$?)" $?
@@ -74,11 +67,10 @@ $CLI $DEBUG -p $PORT 127.0.0.2 --pgpkeyring 
$srcdir/ca-public.gpg </dev/null >/d
 kill $PID
 wait
 
-$SERV -p $PORT --pgpcertfile $srcdir/srv-public-all-signed.gpg --pgpkeyfile 
$srcdir/srv-secret.gpg >/dev/null 2>&1 & PID=$!
-trap "kill $PID" 1 15 2
+launch_server $$ --pgpcertfile $srcdir/srv-public-all-signed.gpg --pgpkeyfile 
$srcdir/srv-secret.gpg >/dev/null 2>&1 & PID=$!
+wait_server $PID
 
 # give the server a chance to initialize
-sleep 2
 echo | $CLI $DEBUG -p $PORT 127.0.0.1 --pgpkeyring $srcdir/ca-public.gpg 
</dev/null >/dev/null || \
   fail "Connection to signed PGP certificate should have succeeded! (error 
code $?)" $?
 
diff --git a/tests/pathlen/Makefile.am b/tests/scripts/Makefile.am
similarity index 86%
copy from tests/pathlen/Makefile.am
copy to tests/scripts/Makefile.am
index bf1cd07..559de27 100644
--- a/tests/pathlen/Makefile.am
+++ b/tests/scripts/Makefile.am
@@ -19,10 +19,5 @@
 # along with this file; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-EXTRA_DIST = ca-no-pathlen.pem no-ca-or-pathlen.pem
+EXTRA_DIST = common.sh
 
-dist_check_SCRIPTS = pathlen
-
-TESTS = pathlen
-
-TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT)
diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh
new file mode 100644
index 0000000..b9183cf
--- /dev/null
+++ b/tests/scripts/common.sh
@@ -0,0 +1,26 @@
+fail() {
+   echo "Failure: $1" >&2
+   exit 1
+}
+
+launch_server() {
+       PARENT=$1;
+       shift;
+       $SERV $DEBUG -p $PORT $* >/dev/null 2>&1 &
+       LOCALPID="$!";
+       trap "[ ! -z \"${LOCALPID}\" ] && kill ${LOCALPID};" 15
+       wait "${LOCALPID}"
+       LOCALRET="$?"
+       if [ "${LOCALRET}" != "0" -a "${LOCALRET}" != "143" ] ; then
+               # Houston, we'v got a problem...
+               echo "Failed to launch a gnutls-serv server !"
+               kill -10 ${PARENT}
+       fi
+}
+
+wait_server() {
+       trap "kill $1" 1 15 2
+       sleep 2
+}
+
+trap "fail \"Failed to launch a gnutls-serv server, aborting test... \"" 10 


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]