diff options
author | Arne Schwabe <arne@rfc2549.org> | 2015-02-12 22:22:25 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2015-02-12 22:22:25 +0100 |
commit | 9f0928c6593f937a17b7974b04051c57e3874b20 (patch) | |
tree | 1aaffa07a5c177fef2c1386f1850a688045bec2e /main/openssl/ssl/s3_pkt.c | |
parent | 68d26e1b1b5b411adce714c88532fc8889289f34 (diff) |
Update OpenSSL to AOSP -master
Diffstat (limited to 'main/openssl/ssl/s3_pkt.c')
-rw-r--r-- | main/openssl/ssl/s3_pkt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/openssl/ssl/s3_pkt.c b/main/openssl/ssl/s3_pkt.c index 4a2f5d6c..c2ae93bc 100644 --- a/main/openssl/ssl/s3_pkt.c +++ b/main/openssl/ssl/s3_pkt.c @@ -183,6 +183,8 @@ int ssl3_read_n(SSL *s, int n, int max, int extend) * at once (as long as it fits into the buffer). */ if (SSL_version(s) == DTLS1_VERSION || SSL_version(s) == DTLS1_BAD_VER) { + if (left == 0 && extend) + return 0; if (left > 0 && n > left) n = left; } @@ -868,8 +870,7 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf, wr->length += eivlen; } - /* ssl3_enc can only have an error on read */ - s->method->ssl3_enc->enc(s,1); + if(s->method->ssl3_enc->enc(s,1)<1) goto err; /* record length after mac and block padding */ s2n(wr->length,plen); |