summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/evp/bio_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/evp/bio_enc.c')
-rw-r--r--crypto/openssl/crypto/evp/bio_enc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/crypto/openssl/crypto/evp/bio_enc.c b/crypto/openssl/crypto/evp/bio_enc.c
index 510e1bc..ab81851 100644
--- a/crypto/openssl/crypto/evp/bio_enc.c
+++ b/crypto/openssl/crypto/evp/bio_enc.c
@@ -271,7 +271,7 @@ static int enc_write(BIO *b, const char *in, int inl)
if (i <= 0)
{
BIO_copy_next_retry(b);
- return(i);
+ return (ret == inl) ? i : ret - inl;
}
n-=i;
ctx->buf_off+=i;
@@ -325,10 +325,7 @@ again:
{
i=enc_write(b,NULL,0);
if (i < 0)
- {
- ret=i;
- break;
- }
+ return i;
}
if (!ctx->finished)
OpenPOWER on IntegriCloud