summaryrefslogtreecommitdiff
path: root/main/openssl/ssl/s2_pkt.c
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2015-02-12 22:22:25 +0100
committerArne Schwabe <arne@rfc2549.org>2015-02-12 22:22:25 +0100
commit9f0928c6593f937a17b7974b04051c57e3874b20 (patch)
tree1aaffa07a5c177fef2c1386f1850a688045bec2e /main/openssl/ssl/s2_pkt.c
parent68d26e1b1b5b411adce714c88532fc8889289f34 (diff)
Update OpenSSL to AOSP -master
Diffstat (limited to 'main/openssl/ssl/s2_pkt.c')
-rw-r--r--main/openssl/ssl/s2_pkt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/openssl/ssl/s2_pkt.c b/main/openssl/ssl/s2_pkt.c
index 8bb6ab8b..acd61dc5 100644
--- a/main/openssl/ssl/s2_pkt.c
+++ b/main/openssl/ssl/s2_pkt.c
@@ -265,7 +265,11 @@ static int ssl2_read_internal(SSL *s, void *buf, int len, int peek)
if ((!s->s2->clear_text) &&
(s->s2->rlength >= (unsigned int)mac_size))
{
- ssl2_enc(s,0);
+ if(!ssl2_enc(s,0))
+ {
+ SSLerr(SSL_F_SSL2_READ_INTERNAL,SSL_R_DECRYPTION_FAILED);
+ return(-1);
+ }
s->s2->ract_data_length-=mac_size;
ssl2_mac(s,mac,0);
s->s2->ract_data_length-=s->s2->padding;
@@ -616,7 +620,8 @@ static int n_do_ssl_write(SSL *s, const unsigned char *buf, unsigned int len)
s->s2->wact_data_length=len+p;
ssl2_mac(s,s->s2->mac_data,1);
s->s2->wlength+=p+mac_size;
- ssl2_enc(s,1);
+ if(ssl2_enc(s,1) < 1)
+ return -1;
}
/* package up the header */