diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-12-19 21:35:53 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-12-20 09:26:17 +0100 |
commit | 5f578c41d8449da5487a1aa23615ebb0b99cedc2 (patch) | |
tree | a74a0e173b7cb57fba382354fc6978768771c5f9 /lib/auto-verify.c | |
parent | cfb3279fc4ca55e82d1b7c50ed7d6d40a295ed16 (diff) | |
download | gnutls-5f578c41d8449da5487a1aa23615ebb0b99cedc2.tar.gz |
priorities: reset the profile flags when appending new flags
That is, to avoid causing issues to applications calling gnutls_*priority_set()
multiple times with different parameters. In that case if multiple profiles are
used the outcome could be undefined. Now, the last call will prevail.
Diffstat (limited to 'lib/auto-verify.c')
-rw-r--r-- | lib/auto-verify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/auto-verify.c b/lib/auto-verify.c index 1cf5f55dfa..179fb1066f 100644 --- a/lib/auto-verify.c +++ b/lib/auto-verify.c @@ -91,8 +91,9 @@ void gnutls_session_set_verify_cert(gnutls_session_t session, session->internals.vc_elements = 0; } - if (flags) - session->internals.additional_verify_flags |= flags; + if (flags) { + ADD_PROFILE_VFLAGS(session, flags); + } gnutls_session_set_verify_function(session, auto_verify_cb); } |