Don't lock anything in SSL_set_generate_session_id.
Nothing else on SSL* is thread-safe. (Also SSL_set_generate_session_id is never called.) This removes the last use of CRYPTO_LOCK_SSL. Change-Id: I4cf8c05d7cef4ea27962ce29902649317c22f74d Reviewed-on: https://boringssl-review.googlesource.com/3361 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
ed3d302190
commit
722696b39e
@ -413,9 +413,7 @@ int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb) {
|
int SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb) {
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_SSL);
|
|
||||||
ssl->generate_session_id = cb;
|
ssl->generate_session_id = cb;
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_SSL);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user