BUG/MINOR: ssl/threads: Make management of the TLS ticket keys files thread-safe
A TLS ticket keys file can be updated on the CLI and used in same time. So we
need to protect it to be sure all accesses are thread-safe. Because updates are
infrequent, a R/W lock has been used.
This patch must be backported in 1.8
diff --git a/include/common/hathreads.h b/include/common/hathreads.h
index 143cf2c..30009cc 100644
--- a/include/common/hathreads.h
+++ b/include/common/hathreads.h
@@ -291,6 +291,7 @@
EMAIL_ALERTS_LOCK,
PIPES_LOCK,
START_LOCK,
+ TLSKEYS_REF_LOCK,
LOCK_LABELS
};
struct lock_stat {
@@ -407,6 +408,7 @@
case EMAIL_ALERTS_LOCK: return "EMAIL_ALERTS";
case PIPES_LOCK: return "PIPES";
case START_LOCK: return "START";
+ case TLSKEYS_REF_LOCK: return "TLSKEYS_REF";
case LOCK_LABELS: break; /* keep compiler happy */
};
/* only way to come here is consecutive to an internal bug */