summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2006-09-21 11:24:59 +0000
committerSimon Josefsson <simon@josefsson.org>2006-09-21 11:24:59 +0000
commita4f4f79f4125a3c64fe907daa21be7256d653128 (patch)
treeaebba74ac7abe181a43bf0834122f49966cff8e5 /src
parent0539fe9be587d01bf4aaa6c82945fd566b4a608c (diff)
downloadgnutls-a4f4f79f4125a3c64fe907daa21be7256d653128.tar.gz
(test_session_resume2): If session-id is NULL, resumption isn't
supported. Tiny patch from Kataja Kai <kai.kataja@op.fi>.
Diffstat (limited to 'src')
-rw-r--r--src/tests.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tests.c b/src/tests.c
index c62e9e012e..dff75170a4 100644
--- a/src/tests.c
+++ b/src/tests.c
@@ -1,6 +1,6 @@
/*
+ * Copyright (C) 2004, 2006 Free Software Foundation
* Copyright (C) 2000,2001,2002,2003 Nikos Mavroyanopoulos
- * Copyright (C) 2004 Free Software Foundation
*
* This file is part of GNUTLS.
*
@@ -1028,6 +1028,9 @@ test_session_resume2 (gnutls_session session)
session_id_size = sizeof (session_id);
gnutls_session_get_id (session, session_id, &session_id_size);
+ if (session_id_size == 0)
+ return TEST_FAILED;
+
if (gnutls_session_is_resumed (session))
return TEST_SUCCEED;