]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: improved duplicate extension test
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 15 Jun 2017 07:06:49 +0000 (09:06 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 15 Jun 2017 07:08:32 +0000 (09:08 +0200)
Instead of sending two duplicate extensions of which one is invalid,
send two valid ones instead. That way, we avoid the possibility of false
positives due to the validation code of the extension contents.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
tests/duplicate-extensions.c

index e9ec304813c47b1a5c872c2f473914f5d068f30d..c6aa8cbdf1a25d1b8c10b5c273798b46a7f644da 100644 (file)
@@ -82,10 +82,10 @@ static unsigned char tls1_hello[] =
        "\xc0\x34\x01\x00\x00\x5d\x00\x17\x00\x00\x00\x16\x00\x00\x00\x05"
        "\x00\x05\x01\x00\x00\x00\x00\x00\x00\x00\x13\x00\x11\x00\x00\x0e"
        "\x77\x77\x77\x2e\x61\x6d\x61\x7a\x6f\x6e\x2e\x63\x6f\x6d\xff\x01"
-       "\x00\x01\x00\x00\x23\x00\x00\x00\x0a\x00\x08\x00\x06\x00\x17\x00"
-       "\x18\x00\x19\x00\x0a\x00\x02\x01\x00\x00\x0d\x00\x16\x00\x14\x04"
-       "\x01\x04\x03\x05\x01\x05\x03\x06\x01\x06\x03\x03\x01\x03\x03\x02"
-       "\x01\x02\x03";
+       "\x00\x01\x00\x00\x23\x00\x00\x00\x0b\x00\x02\x01\x00\x00\x0b\x00"
+       "\x02\x01\x00\x00\x0d\x00\x16\x00\x14\x04\x01\x04\x03\x05\x01\x05"
+       "\x03\x06\x01\x06\x03\x03\x01\x03\x03\x02\x01\x02\x03\x00\x0a\x00"
+       "\x02\x00\x17";
 
 static void client(int sd)
 {