From: Nikos Mavrogiannopoulos Date: Thu, 1 Sep 2011 08:31:19 +0000 (+0200) Subject: explicitly enable openpgp certtype in tests. X-Git-Tag: gnutls_3_0_2^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d0c9ec20702e9f06eebd8aef94ad5650568e174;p=thirdparty%2Fgnutls.git explicitly enable openpgp certtype in tests. --- diff --git a/doc/examples/ex-serv-pgp.c b/doc/examples/ex-serv-pgp.c index 43744839f6..5c73b93691 100644 --- a/doc/examples/ex-serv-pgp.c +++ b/doc/examples/ex-serv-pgp.c @@ -56,7 +56,7 @@ initialize_tls_session (void) gnutls_init (&session, GNUTLS_SERVER); - gnutls_priority_set_direct (session, "NORMAL", NULL); + gnutls_priority_set_direct (session, "NORMAL:+CTYPE-OPENPGP", NULL); /* request client certificate if any. */ diff --git a/tests/openpgp-certs/testcerts b/tests/openpgp-certs/testcerts index 3ae5065e1a..3a3afad29d 100755 --- a/tests/openpgp-certs/testcerts +++ b/tests/openpgp-certs/testcerts @@ -35,7 +35,7 @@ fi echo "Checking OpenPGP certificate verification" -launch_server $$ --pgpcertfile $srcdir/srv-public-127.0.0.1-signed.gpg --pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 & PID=$! +launch_server $$ --priority NORMAL:+CTYPE-OPENPGP --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 @@ -46,22 +46,22 @@ wait_server $PID #$CLI -p $PORT 127.0.0.1 --pgpkeyring ca-public.gpg /dev/null || \ # fail "Connection to verified IP address should have succeeded! (error code $?)" $? -$CLI $DEBUG -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg /dev/null 2>&1 && \ +$CLI $DEBUG -p $PORT 127.0.0.2 --priority NORMAL:+CTYPE-OPENPGP --pgpkeyring $srcdir/ca-public.gpg /dev/null 2>&1 && \ fail $PID "Connection to unrecognized IP address should have failed!" -$CLI $DEBUG -p $PORT localhost --pgpkeyring $srcdir/ca-public.gpg /dev/null 2>&1 && \ +$CLI $DEBUG -p $PORT localhost --priority NORMAL:+CTYPE-OPENPGP --pgpkeyring $srcdir/ca-public.gpg /dev/null 2>&1 && \ fail $PID "Connection to unverified (but present) 'localhost' should have failed!" kill $PID wait -launch_server $$ --pgpcertfile $srcdir/srv-public-localhost-signed.gpg --pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 & PID=$! +launch_server $$ --priority NORMAL:+CTYPE-OPENPGP --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 2>&1 && \ +echo | $CLI $DEBUG --priority NORMAL:+CTYPE-OPENPGP -p $PORT 127.0.0.1 --pgpkeyring $srcdir/ca-public.gpg /dev/null 2>&1 && \ fail $PID "Connection to unverified IP address should have failed! (error code $?)" $? -$CLI $DEBUG -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg /dev/null 2>&1 && \ +$CLI $DEBUG --priority NORMAL:+CTYPE-OPENPGP -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg /dev/null 2>&1 && \ fail $PID "Connection to unrecognized IP address should have failed!" #see reason above @@ -71,14 +71,14 @@ $CLI $DEBUG -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg /d kill $PID wait -launch_server $$ --pgpcertfile $srcdir/srv-public-all-signed.gpg --pgpkeyfile $srcdir/srv-secret.gpg >/dev/null 2>&1 & PID=$! +launch_server $$ --priority NORMAL:+CTYPE-OPENPGP --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 -echo | $CLI $DEBUG -p $PORT 127.0.0.1 --pgpkeyring $srcdir/ca-public.gpg /dev/null || \ +echo | $CLI $DEBUG --priority NORMAL:+CTYPE-OPENPGP -p $PORT 127.0.0.1 --pgpkeyring $srcdir/ca-public.gpg /dev/null || \ fail $PID "Connection to signed PGP certificate should have succeeded! (error code $?)" $? -$CLI $DEBUG -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg /dev/null && \ +$CLI $DEBUG --priority NORMAL:+CTYPE-OPENPGP -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg /dev/null && \ fail $PID "Connection to unrecognized IP address should have failed!" kill $PID