Only reserve EVP_MAX_MD_SIZE for the Finished, not twice of it.
EVP_MAX_MD_SIZE is large enough to fit a MD5/SHA1 concatenation, and necessarily is because EVP_md5_sha1 exists. This shaves 128 bytes of per-connection state. Change-Id: I848a8563dfcbac14735bb7b302263a638528f98e Reviewed-on: https://boringssl-review.googlesource.com/6804 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
0d56f888c3
commit
fe5f7c7b56
@ -3986,10 +3986,9 @@ typedef struct ssl3_state_st {
|
||||
* pending handshake state here so it can be managed separately from
|
||||
* established connection state in case of renegotiations. */
|
||||
struct {
|
||||
/* actually only need to be 16+20 for SSLv3 and 12 for TLS */
|
||||
uint8_t finish_md[EVP_MAX_MD_SIZE * 2];
|
||||
uint8_t finish_md[EVP_MAX_MD_SIZE];
|
||||
int finish_md_len;
|
||||
uint8_t peer_finish_md[EVP_MAX_MD_SIZE * 2];
|
||||
uint8_t peer_finish_md[EVP_MAX_MD_SIZE];
|
||||
int peer_finish_md_len;
|
||||
|
||||
unsigned long message_size;
|
||||
|
Loading…
Reference in New Issue
Block a user