summaryrefslogtreecommitdiff
path: root/lib/gnutls_int.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2019-02-25 15:11:19 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2019-03-02 21:15:26 +0100
commite53bd8ed2010cc061a9d36cfc36cf8d076894ee1 (patch)
treec7db69a59f1f656a48114497479cbea38e26b016 /lib/gnutls_int.h
parent6868c57f0879e32f1a2d9da994bdf165609afc25 (diff)
downloadgnutls-e53bd8ed2010cc061a9d36cfc36cf8d076894ee1.tar.gz
gnutls_record_send2: try to ensure integrity of operations on false and early start
This adds a double check in the sanity check of gnutls_record_send2() for the initial_negotiation_completed value, making sure that the check will be successful even in parallel operation of send/recv. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/gnutls_int.h')
-rw-r--r--lib/gnutls_int.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 2352299cd8..a340d3747d 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -1281,6 +1281,9 @@ typedef struct {
/* A handshake process has been completed */
bool initial_negotiation_completed;
+ void *post_negotiation_lock; /* protects access to the variable above
+ * in the cases where negotiation is incomplete
+ * after gnutls_handshake() - early/false start */
/* The type of transport protocol; stream or datagram */
transport_t transport;