Move state machine knowledge out of the record layer
[openssl.git] / ssl / bio_ssl.c
index 596df240d3ddf2b8cc3246ac079182a270ba711b..e48b90fceaa0cfeb7859a8f2cf6ab8df0b16cce7 100644 (file)
@@ -107,8 +107,6 @@ static int ssl_read(BIO *b, char *buf, size_t size, size_t *readbytes)
 
     switch (SSL_get_error(ssl, ret)) {
     case SSL_ERROR_NONE:
-        if (*readbytes == 0)
-            break;
         if (sb->renegotiate_count > 0) {
             sb->byte_count += *readbytes;
             if (sb->byte_count > sb->renegotiate_count) {
@@ -178,8 +176,6 @@ static int ssl_write(BIO *b, const char *buf, size_t size, size_t *written)
 
     switch (SSL_get_error(ssl, ret)) {
     case SSL_ERROR_NONE:
-        if (*written == 0)
-            break;
         if (bs->renegotiate_count > 0) {
             bs->byte_count += *written;
             if (bs->byte_count > bs->renegotiate_count) {