summaryrefslogtreecommitdiff
path: root/lib/gnutls_priority.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-10-07 18:12:02 +0200
committerSimon Josefsson <simon@josefsson.org>2009-10-07 18:12:02 +0200
commit6e7f7b9d7b9b26872ee071582dc51a5c57e63182 (patch)
tree6cb09b01b396b1a95202ad0cc6e0d118d96aec76 /lib/gnutls_priority.c
parent3c963bc6671daaf75da355878b79f87478b32c25 (diff)
downloadgnutls-6e7f7b9d7b9b26872ee071582dc51a5c57e63182.tar.gz
After setting priorities using new API, update current TLS version.
Diffstat (limited to 'lib/gnutls_priority.c')
-rw-r--r--lib/gnutls_priority.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gnutls_priority.c b/lib/gnutls_priority.c
index a99cea38a6..f50eb8cccd 100644
--- a/lib/gnutls_priority.c
+++ b/lib/gnutls_priority.c
@@ -426,6 +426,13 @@ gnutls_priority_set (gnutls_session_t session, gnutls_priority_t priority)
memcpy (&session->internals.priorities, priority,
sizeof (struct gnutls_priority_st));
+ /* set the current version to the first in the chain.
+ * This will be overridden later.
+ */
+ if (session->internals.priorities.protocol.algorithms > 0)
+ _gnutls_set_current_version (session, session->internals.
+ priorities.protocol.priority[0]);
+
return 0;
}