diff options
author | David Benjamin <davidben@google.com> | 2016-07-09 00:32:11 +0300 |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2016-07-12 02:01:32 +0300 |
commit | 09eb655e5cb202878b831eadb30c92ab24960d4a (patch) | |
tree | bb3e1a010f1fd5326d1ab4cb1823694e99baefbf /include | |
parent | 528bd26dd9a7db0162ff797d19a8e64e21f9817f (diff) |
Simplify ssl_get_message somewhat.
It still places the current message all over the place, but remove the
bizarre init_num/error/ok split. Now callers get the message length out
of init_num, which mirrors init_msg. Also fix some signedness.
Change-Id: Ic2e97b6b99e234926504ff217b8aedae85ba6596
Reviewed-on: https://boringssl-review.googlesource.com/8690
Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/ssl.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 5148fad0..2ae5ab1a 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -3938,10 +3938,15 @@ struct ssl_st { int state; /* where we are */ BUF_MEM *init_buf; /* buffer used during init */ - uint8_t *init_msg; /* pointer to handshake message body, set by - ssl3_get_message() */ - int init_num; /* amount read/written */ - int init_off; /* amount read/written */ + + /* init_msg is a pointer to the current handshake message body. */ + const uint8_t *init_msg; + /* init_num is the length of the current handshake message body. */ + uint32_t init_num; + + /* init_off, in DTLS, is the number of bytes of the current message that have + * been written. */ + uint32_t init_off; struct ssl3_state_st *s3; /* SSLv3 variables */ struct dtls1_state_st *d1; /* DTLSv1 variables */ @@ -4189,9 +4194,9 @@ typedef struct ssl3_state_st { * established connection state in case of renegotiations. */ struct { uint8_t finish_md[EVP_MAX_MD_SIZE]; - int finish_md_len; + uint8_t finish_md_len; uint8_t peer_finish_md[EVP_MAX_MD_SIZE]; - int peer_finish_md_len; + uint8_t peer_finish_md_len; int message_type; |