[glib-networking/wip/nacho/openssl] openssl: try to fix test
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/wip/nacho/openssl] openssl: try to fix test
- Date: Wed, 19 Sep 2018 16:22:24 +0000 (UTC)
commit 2612f797349edf098d5d0169ed734a13869e9c51
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Wed Sep 19 18:16:06 2018 +0200
openssl: try to fix test
tls/tests/connection.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index 94c1e94..6577ca1 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -37,6 +37,10 @@
#include <gnutls/gnutls.h>
#endif
+#ifdef BACKEND_IS_OPENSSL
+#include <openssl/ssl.h>
+#endif
+
static const gchar *
tls_test_file_path (const char *name)
{
@@ -1225,7 +1229,14 @@ test_client_auth_request_fail (TestConnection *test,
read_test_data_async (test);
g_main_loop_run (test->loop);
+ /* FIXME: is it correct to get G_TLS_ERROR_CERTIFICATE_REQUIRED here or should
+ * we fix the test case to avoid this and to really get the interaction error?
+ */
+#if OPENSSL_VERSION_NUMBER > 0x10100000L
+ g_assert_error (test->read_error, G_TLS_ERROR, G_TLS_ERROR_CERTIFICATE_REQUIRED);
+#else
g_assert_error (test->read_error, G_FILE_ERROR, G_FILE_ERROR_ACCES);
+#endif
g_io_stream_close (test->server_connection, NULL, NULL);
g_io_stream_close (test->client_connection, NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]