[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r15275 - libmicrohttpd/src/testcurl/https
From: |
gnunet |
Subject: |
[GNUnet-SVN] r15275 - libmicrohttpd/src/testcurl/https |
Date: |
Fri, 20 May 2011 22:12:36 +0200 |
Author: grothoff
Date: 2011-05-20 22:12:36 +0200 (Fri, 20 May 2011)
New Revision: 15275
Modified:
libmicrohttpd/src/testcurl/https/tls_session_time_out_test.c
libmicrohttpd/src/testcurl/https/tls_test_common.c
Log:
Fixing 1668
Modified: libmicrohttpd/src/testcurl/https/tls_session_time_out_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_session_time_out_test.c
2011-05-20 17:36:07 UTC (rev 15274)
+++ libmicrohttpd/src/testcurl/https/tls_session_time_out_test.c
2011-05-20 20:12:36 UTC (rev 15275)
@@ -68,6 +68,7 @@
ret = gnutls_handshake (session);
if (ret < 0)
{
+ fprintf (stderr, "Handshake failed\n");
return -1;
}
@@ -77,6 +78,7 @@
/* TODO better RST trigger */
if (send (sd, "", 1, 0) == 0)
{
+ fprintf (stderr, "Connection failed to time-out\n");
return -1;
}
@@ -111,7 +113,11 @@
return -1;
}
- setup_session (&session, &key, &cert, &xcred);
+ if (0 != setup_session (&session, &key, &cert, &xcred))
+ {
+ fprintf (stderr, "failed to setup session\n");
+ return 1;
+ }
errorCount += test_tls_session_time_out (session);
teardown_session (session, &key, &cert, xcred);
Modified: libmicrohttpd/src/testcurl/https/tls_test_common.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_test_common.c 2011-05-20 17:36:07 UTC
(rev 15274)
+++ libmicrohttpd/src/testcurl/https/tls_test_common.c 2011-05-20 20:12:36 UTC
(rev 15275)
@@ -374,6 +374,7 @@
key->data = malloc (key->size);
if (key->data == NULL)
{
+ gnutls_certificate_free_credentials (*xcred);
return -1;
}
memcpy (key->data, srv_key_pem, key->size);
@@ -381,6 +382,7 @@
cert->data = malloc (cert->size);
if (cert->data == NULL)
{
+ gnutls_certificate_free_credentials (*xcred);
free (key->data);
return -1;
}
@@ -392,12 +394,14 @@
"NORMAL", &err_pos);
if (ret < 0)
{
+ gnutls_deinit (*session);
+ gnutls_certificate_free_credentials (*xcred);
free (key->data);
return -1;
}
gnutls_credentials_set (*session,
GNUTLS_CRD_CERTIFICATE,
- xcred);
+ *xcred);
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r15275 - libmicrohttpd/src/testcurl/https,
gnunet <=