diff options
author | jkim <jkim@FreeBSD.org> | 2015-01-08 23:42:41 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2015-01-08 23:42:41 +0000 |
commit | 4f9b1cef1a6825f03178937e0feb39a2b2d046c8 (patch) | |
tree | 6c2f3cb14d70e0247fe500835bed3d3588c3025e /crypto/openssl/ssl/s3_pkt.c | |
parent | cfd5b20c8bb6e3677ef84152d28058c0ead0de39 (diff) | |
parent | a350427e88bc6ff288594c964ca0f57464062eb0 (diff) | |
download | FreeBSD-src-4f9b1cef1a6825f03178937e0feb39a2b2d046c8.zip FreeBSD-src-4f9b1cef1a6825f03178937e0feb39a2b2d046c8.tar.gz |
Merge OpenSSL 1.0.1k.
Diffstat (limited to 'crypto/openssl/ssl/s3_pkt.c')
-rw-r--r-- | crypto/openssl/ssl/s3_pkt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/openssl/ssl/s3_pkt.c b/crypto/openssl/ssl/s3_pkt.c index 4c9285f..1ec9e6e 100644 --- a/crypto/openssl/ssl/s3_pkt.c +++ b/crypto/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; } @@ -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); |