]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: modified gnutls_priority_set2() tests for gnutls_priority_set()
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 21 Jul 2017 12:20:26 +0000 (14:20 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 25 Jul 2017 07:17:20 +0000 (09:17 +0200)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
tests/priority-set.c
tests/priority-set2.c

index 5cd00685ced63aa4f8f11b9372eeeb23729dd0d1..ccbd3955d979dd9b29aec3eb34e4d16cd3f4c351 100644 (file)
 #include "eagain-common.h"
 #include "cert-common.h"
 
+/* This tests whether a priority which is used by multiple sessions,
+ * will be properly deinitialized.
+ */
+
 const char *side;
 
 static void tls_log_func(int level, const char *str)
index 908188a8c88aec456ac8bf4eb7e55260372f2cde..e1187e75a39ce41e91b09a02591ed9d3474dd216 100644 (file)
 #include "eagain-common.h"
 #include "cert-common.h"
 
+/* This tests whether a priority which is deinitialized after set
+ * will continue working in a session.
+ */
+
 const char *side;
 
 static void tls_log_func(int level, const char *str)
@@ -84,7 +88,8 @@ void doit(void)
        gnutls_init(&server, GNUTLS_SERVER);
        gnutls_credentials_set(server, GNUTLS_CRD_CERTIFICATE,
                                serverx509cred);
-       gnutls_priority_set2(server, cache, 0);
+       gnutls_priority_set(server, cache);
+
        gnutls_transport_set_push_function(server, server_push);
        gnutls_transport_set_pull_function(server, server_pull);
        gnutls_transport_set_ptr(server, server);
@@ -107,7 +112,7 @@ void doit(void)
        if (ret < 0)
                exit(1);
 
-       gnutls_priority_set_direct(client, "NORMAL", NULL);
+       gnutls_priority_set(client, cache);
        gnutls_transport_set_push_function(client, client_push);
        gnutls_transport_set_pull_function(client, client_pull);
        gnutls_transport_set_ptr(client, client);