Set error if EVP_CipherUpdate fails.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 26 Jul 2016 15:51:49 +0000 (16:51 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 26 Jul 2016 15:51:49 +0000 (16:51 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/evp/bio_enc.c

index 5a4d9c5d874996c0d8ee4debf2c4d1c6a809b09f..d1422f03bff3a87f14a6aa7e81da0e55a9f928ab 100644 (file)
@@ -163,6 +163,7 @@ static int enc_read(BIO *b, char *out, int outl)
                                   (unsigned char *)&(ctx->buf[BUF_OFFSET]),
                                   i)) {
                 BIO_clear_retry_flags(b);
                                   (unsigned char *)&(ctx->buf[BUF_OFFSET]),
                                   i)) {
                 BIO_clear_retry_flags(b);
+                ctx->ok = 0;
                 return 0;
             }
             ctx->cont = 1;
                 return 0;
             }
             ctx->cont = 1;