diff options
author | doug <> | 2014-12-15 00:46:53 +0000 |
---|---|---|
committer | doug <> | 2014-12-15 00:46:53 +0000 |
commit | 5ff3741c44f372895206f59414df34e2dcd5eaa0 (patch) | |
tree | a755a6603462bb1b649e3f343d73dd0e1c3b34c5 /src/lib/libssl/ssl_locl.h | |
parent | 02216b57a0ccb0dd187f3ea646c6ae40e827d3ae (diff) | |
download | openbsd-5ff3741c44f372895206f59414df34e2dcd5eaa0.tar.gz openbsd-5ff3741c44f372895206f59414df34e2dcd5eaa0.tar.bz2 openbsd-5ff3741c44f372895206f59414df34e2dcd5eaa0.zip |
Add error handling for EVP_DigestInit_ex().
A few EVP_DigestInit_ex() calls were left alone since reporting an
error would change the public API.
Changed internal ssl3_cbc_digest_record() to return a value due to the above
change. It will also now set md_out_size=0 on failure.
This is based on part of BoringSSL's commit to fix malloc crashes:
https://boringssl.googlesource.com/boringssl/+/69a01608f33ab6fe2c3485d94aef1fe9eacf5364
ok miod@
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 97e32de380..3312aebaad 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.83 2014/12/14 16:19:38 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.84 2014/12/15 00:46:53 doug 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 | * |
@@ -865,7 +865,7 @@ int ssl3_cbc_remove_padding(const SSL *s, SSL3_RECORD *rec, | |||
865 | int tls1_cbc_remove_padding(const SSL *s, SSL3_RECORD *rec, | 865 | int tls1_cbc_remove_padding(const SSL *s, SSL3_RECORD *rec, |
866 | unsigned block_size, unsigned mac_size); | 866 | unsigned block_size, unsigned mac_size); |
867 | char ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx); | 867 | char ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx); |
868 | void ssl3_cbc_digest_record(const EVP_MD_CTX *ctx, unsigned char *md_out, | 868 | int ssl3_cbc_digest_record(const EVP_MD_CTX *ctx, unsigned char *md_out, |
869 | size_t *md_out_size, const unsigned char header[13], | 869 | size_t *md_out_size, const unsigned char header[13], |
870 | const unsigned char *data, size_t data_plus_mac_size, | 870 | const unsigned char *data, size_t data_plus_mac_size, |
871 | size_t data_plus_mac_plus_padding_size, const unsigned char *mac_secret, | 871 | size_t data_plus_mac_plus_padding_size, const unsigned char *mac_secret, |