Pass explicit parameters elsewhere.
The remaining direct accesses are in functions which expect to be called
in and out of the handshake. Accordingly, they are NULL-checked.
Change-Id: I07a7de6bdca7b6f8d09e22da11b8863ebf41389a
Reviewed-on: https://boringssl-review.googlesource.com/12343
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/ssl/handshake_client.c b/ssl/handshake_client.c
index 2ee5408..09b16eb 100644
--- a/ssl/handshake_client.c
+++ b/ssl/handshake_client.c
@@ -535,7 +535,7 @@
ssl->s3->initial_handshake_complete = 1;
if (is_initial_handshake) {
/* Renegotiations do not participate in session resumption. */
- ssl_update_cache(ssl, SSL_SESS_CACHE_CLIENT);
+ ssl_update_cache(hs, SSL_SESS_CACHE_CLIENT);
}
ret = 1;
@@ -927,7 +927,7 @@
/* The session wasn't resumed. Create a fresh SSL_SESSION to
* fill out. */
ssl_set_session(ssl, NULL);
- if (!ssl_get_new_session(ssl, 0 /* client */)) {
+ if (!ssl_get_new_session(hs, 0 /* client */)) {
goto f_err;
}
/* Note: session_id could be empty. */
@@ -1424,7 +1424,7 @@
if (ssl3_protocol_version(ssl) >= TLS1_2_VERSION) {
CBS supported_signature_algorithms;
if (!CBS_get_u16_length_prefixed(&cbs, &supported_signature_algorithms) ||
- !tls1_parse_peer_sigalgs(ssl, &supported_signature_algorithms)) {
+ !tls1_parse_peer_sigalgs(hs, &supported_signature_algorithms)) {
ssl3_send_alert(ssl, SSL3_AL_FATAL, SSL_AD_DECODE_ERROR);
OPENSSL_PUT_ERROR(SSL, SSL_R_DECODE_ERROR);
return -1;
@@ -1736,7 +1736,7 @@
}
uint16_t signature_algorithm;
- if (!tls1_choose_signature_algorithm(ssl, &signature_algorithm)) {
+ if (!tls1_choose_signature_algorithm(hs, &signature_algorithm)) {
goto err;
}
if (ssl3_protocol_version(ssl) >= TLS1_2_VERSION) {