]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Use port 5557.
authorSimon Josefsson <simon@josefsson.org>
Tue, 10 Jun 2008 14:05:21 +0000 (16:05 +0200)
committerSimon Josefsson <simon@josefsson.org>
Tue, 10 Jun 2008 14:05:21 +0000 (16:05 +0200)
tests/openpgp-certs/testcerts

index 17062d857152c295e722f0db4b6353cfece87d30..33643d9b3976485e3a4cc192c2c9184c12bcc680 100755 (executable)
@@ -1,8 +1,9 @@
-#!/bin/bash -x
+#!/bin/bash
 
 srcdir="${srcdir:-.}"
 SERV="${SERV:-../../src/gnutls-serv} -q"
 CLI="${CLI:-../../src/gnutls-cli}"
+PORT="${PORT:-5557}"
 unset RETCODE
 
 fail() {
@@ -12,7 +13,7 @@ fail() {
 
 echo "Checking OpenPGP certificate verification"
 
-$SERV -p 5556 --pgpcertfile $srcdir/srv-public-127.0.0.1-signed.gpg --pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 &
+$SERV -p $PORT --pgpcertfile $srcdir/srv-public-127.0.0.1-signed.gpg --pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 &
 
 # give the server a chance to initialize
 sleep 2
@@ -20,42 +21,42 @@ sleep 2
 #gnutls currently only considers PGP certificates verified only if
 #all user IDs in the certificate were signed.
 
-#$CLI -p 5556 127.0.0.1 --pgpkeyring ca-public.gpg </dev/null >/dev/null || \
+#$CLI -p $PORT 127.0.0.1 --pgpkeyring ca-public.gpg </dev/null >/dev/null || \
 #  fail "Connection to verified IP address should have succeeded! (error code $?)" $?
 
-$CLI -p 5556 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null && \
+$CLI -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null && \
   fail "Connection to unrecognized IP address should have failed!"
 
-$CLI -p 5556 localhost --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null && \
+$CLI -p $PORT localhost --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null && \
   fail "Connection to unverified (but present) 'localhost' should have failed!"
 
 kill %1
 wait
 
-$SERV -p 5556 --pgpcertfile $srcdir/srv-public-localhost-signed.gpg --pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 &
+$SERV -p $PORT --pgpcertfile $srcdir/srv-public-localhost-signed.gpg --pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 &
 # give the server a chance to initialize
 sleep 2
 
-echo | $CLI -p 5556 127.0.0.1 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null && \
+echo | $CLI -p $PORT 127.0.0.1 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null && \
   fail "Connection to unverified IP address should have failed! (error code $?)" $?
 
-$CLI -p 5556 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null && \
+$CLI -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null && \
   fail "Connection to unrecognized IP address should have failed!"
 
 #see reason above
-#$CLI -p 5556 localhost --pgpkeyring ca-public.gpg </dev/null >/dev/null || \
+#$CLI -p $PORT localhost --pgpkeyring ca-public.gpg </dev/null >/dev/null || \
 #  fail "Connection to verified 'localhost' should have succeded! (error code $?)" $?
 
 kill %1 >/dev/null 2>&1
 wait
 
-$SERV -p 5556 --pgpcertfile $srcdir/srv-public-all-signed.gpg --pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 &
+$SERV -p $PORT --pgpcertfile $srcdir/srv-public-all-signed.gpg --pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 &
 # give the server a chance to initialize
 sleep 2
-echo | $CLI -p 5556 127.0.0.1 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null || \
+echo | $CLI -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 $?)" $?
 
-$CLI -p 5556 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null && \
+$CLI -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null && \
   fail "Connection to unrecognized IP address should have failed!"
 
 kill %1 >/dev/null 2>&1