diff options
author | Andy Polyakov <appro@openssl.org> | 2014-02-14 17:43:31 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-02-14 17:45:33 +0100 |
commit | aff78bb39aa077874f91151033f44306515c3d2f (patch) | |
tree | e236f2309dd407e9b65a73177837e1c31d06a907 /ssl | |
parent | 104c032b7bed893f87d08ef3178848715e7035b3 (diff) |
ssl/s3_pkt.c: detect RAND_bytes error in multi-block.
(cherry picked from commit 701134320a94908d8c0ac513741cab41e215a7b5)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s3_pkt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index ddb474bb93..a41c54f11b 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -725,9 +725,10 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) mb_param.inp = &buf[tot]; mb_param.len = nw; - EVP_CIPHER_CTX_ctrl(s->enc_write_ctx, - EVP_CTRL_TLS1_1_MULTIBLOCK_ENCRYPT, - sizeof(mb_param),&mb_param); + if (EVP_CIPHER_CTX_ctrl(s->enc_write_ctx, + EVP_CTRL_TLS1_1_MULTIBLOCK_ENCRYPT, + sizeof(mb_param),&mb_param)<=0) + return -1; s->s3->write_sequence[7] += mb_param.interleave; if (s->s3->write_sequence[7] < mb_param.interleave) |