aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/s3_pkt.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-01-08 22:40:39 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-01-08 22:40:39 +0000
commitc6485458b37e3f0f5d1c69c0452e4551ac3b1824 (patch)
treec2b36ecba3cb850d324786e97809c541cb5c2d5a /ssl/s3_pkt.c
parent58ab7656b2c140e06d60a7831a9f5b6e1ddc2fe5 (diff)
downloadsrc-c6485458b37e3f0f5d1c69c0452e4551ac3b1824.tar.gz
src-c6485458b37e3f0f5d1c69c0452e4551ac3b1824.zip
Import OpenSSL 1.0.1k.vendor/openssl/1.0.1k
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=276856 svn path=/vendor-crypto/openssl/1.0.1k/; revision=276858; tag=vendor/openssl/1.0.1k
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r--ssl/s3_pkt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 4c9285f355b2..1ec9e6ea46da 100644
--- a/ssl/s3_pkt.c
+++ b/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;
}
@@ -856,8 +858,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);