bneradt commented on code in PR #13490:
URL: https://github.com/apache/trafficserver/pull/13490#discussion_r3716053276
##########
src/iocore/net/OCSPStapling.cc:
##########
@@ -282,19 +284,22 @@ namespace
// Cached info stored in SSL_CTX ex_info
struct certinfo {
- unsigned char idx[20] = {}; // Index in session cache SHA1 hash of
certificate
- TS_OCSP_CERTID *cid = nullptr; // Certificate ID for OCSP requests
- char *uri = nullptr; // Responder details
- char *certname = nullptr;
- char *user_agent = nullptr;
- ink_mutex stapling_mutex;
- unsigned char resp_der[MAX_STAPLING_DER] = {};
- unsigned int resp_derlen = 0;
- bool is_prefetched = false;
- bool is_expire = true;
- time_t expire_time = 0;
-
- certinfo() { ink_mutex_init(&stapling_mutex); }
+ unsigned char idx[20] = {}; // Index in session cache SHA1 hash
of certificate
+ TS_OCSP_CERTID *cid = nullptr; // Certificate ID for OCSP requests
or nullptr if ID cannot be determined
+ char *uri = nullptr; // Responder details
+ char *certname = nullptr;
+ char *user_agent = nullptr;
+ bool is_prefetched = false;
+
+ // OCSP response data, protected by resp_mutex.
+ // Readers take a shared lock; the updater takes an exclusive lock.
+ unsigned char resp_der[MAX_STAPLING_DER] = {};
+ unsigned int resp_derlen = 0;
+ bool is_expire = true;
+ time_t expire_time = 0;
+ mutable ts::bravo::shared_mutex resp_mutex;
Review Comment:
is_prefetched is now constructor-initialized and const, so it cannot change
after publication.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]