diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-02-09 23:09:27 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-02-09 23:09:27 +0100 |
commit | 499ffc306da6ce7b275bdccb9fde2aa2d83c506f (patch) | |
tree | b112f38c10e03e2694ada64e5c2bac5f15f0fa69 /tests/anonself.c | |
parent | 3681fb4b1fab0776eabeaeed5163a3636db3a76c (diff) | |
download | gnutls-499ffc306da6ce7b275bdccb9fde2aa2d83c506f.tar.gz |
Modernized the test applications that now use the gnutls_priority_set_direct().
Diffstat (limited to 'tests/anonself.c')
-rw-r--r-- | tests/anonself.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/anonself.c b/tests/anonself.c index f110e18c71..134b88babb 100644 --- a/tests/anonself.c +++ b/tests/anonself.c @@ -62,7 +62,6 @@ client (void) char buffer[MAX_BUF + 1]; gnutls_anon_client_credentials_t anoncred; /* Need to enable anonymous KX specifically. */ - const int kx_prio[] = { GNUTLS_KX_ANON_DH, 0 }; gnutls_global_init (); @@ -77,8 +76,7 @@ client (void) gnutls_init (&session, GNUTLS_CLIENT); /* Use default priorities */ - gnutls_set_default_priority (session); - gnutls_kx_set_priority (session, kx_prio); + gnutls_priority_set_direct (session, "NONE:+VERS-TLS-ALL:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-DH", NULL); /* put the anonymous credentials to the current session */ @@ -164,15 +162,13 @@ static gnutls_session_t initialize_tls_session (void) { gnutls_session_t session; - const int kx_prio[] = { GNUTLS_KX_ANON_DH, 0 }; gnutls_init (&session, GNUTLS_SERVER); /* avoid calling all the priority functions, since the defaults * are adequate. */ - gnutls_set_default_priority (session); - gnutls_kx_set_priority (session, kx_prio); + gnutls_priority_set_direct (session, "NONE:+VERS-TLS-ALL:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-DH", NULL); gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred); |