diff options
author | jsing <> | 2017-03-05 14:39:53 +0000 |
---|---|---|
committer | jsing <> | 2017-03-05 14:39:53 +0000 |
commit | e04ca894aa08b4b01dbc7ead7524d8026ce8f3be (patch) | |
tree | 4868a41992758cf1a7f9ffdaf1b940ee7bcceb4c /src/lib/libssl/s3_lib.c | |
parent | b7e97f3829f43765f12691c1665b5e6017d75d28 (diff) | |
download | openbsd-e04ca894aa08b4b01dbc7ead7524d8026ce8f3be.tar.gz openbsd-e04ca894aa08b4b01dbc7ead7524d8026ce8f3be.tar.bz2 openbsd-e04ca894aa08b4b01dbc7ead7524d8026ce8f3be.zip |
Provide a rolling handshake hash that commences as soon as the cipher
suite has been selected, and convert the final finish MAC to use this
handshake hash.
This is a first step towards cleaning up the current handshake
buffer/digest code.
ok beck@ inoguchi@
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
-rw-r--r-- | src/lib/libssl/s3_lib.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 3f09834ab1..d6bf6a4574 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_lib.c,v 1.136 2017/03/04 16:32:00 jsing Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.137 2017/03/05 14:39:53 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -1839,8 +1839,12 @@ ssl3_free(SSL *s) | |||
1839 | free(S3I(s)->tmp.x25519); | 1839 | free(S3I(s)->tmp.x25519); |
1840 | 1840 | ||
1841 | sk_X509_NAME_pop_free(S3I(s)->tmp.ca_names, X509_NAME_free); | 1841 | sk_X509_NAME_pop_free(S3I(s)->tmp.ca_names, X509_NAME_free); |
1842 | |||
1842 | BIO_free(S3I(s)->handshake_buffer); | 1843 | BIO_free(S3I(s)->handshake_buffer); |
1844 | |||
1843 | tls1_free_digest_list(s); | 1845 | tls1_free_digest_list(s); |
1846 | tls1_handshake_hash_free(s); | ||
1847 | |||
1844 | free(S3I(s)->alpn_selected); | 1848 | free(S3I(s)->alpn_selected); |
1845 | 1849 | ||
1846 | explicit_bzero(S3I(s), sizeof(*S3I(s))); | 1850 | explicit_bzero(S3I(s), sizeof(*S3I(s))); |
@@ -1881,6 +1885,7 @@ ssl3_clear(SSL *s) | |||
1881 | S3I(s)->handshake_buffer = NULL; | 1885 | S3I(s)->handshake_buffer = NULL; |
1882 | 1886 | ||
1883 | tls1_free_digest_list(s); | 1887 | tls1_free_digest_list(s); |
1888 | tls1_handshake_hash_free(s); | ||
1884 | 1889 | ||
1885 | free(S3I(s)->alpn_selected); | 1890 | free(S3I(s)->alpn_selected); |
1886 | S3I(s)->alpn_selected = NULL; | 1891 | S3I(s)->alpn_selected = NULL; |