/* reference output for single-chunk operation */
b = BIO_new(BIO_f_cipher());
+ if (!TEST_ptr(b))
+ return 0;
if (!TEST_true(BIO_set_cipher(b, cipher, key, iv, ENCRYPT)))
return 0;
BIO_push(b, BIO_new_mem_buf(inp, DATA_SIZE));
/* perform split operations and compare to reference */
for (i = 1; i < lref; i++) {
b = BIO_new(BIO_f_cipher());
+ if (!TEST_ptr(b))
+ return 0;
if (!TEST_true(BIO_set_cipher(b, cipher, key, iv, ENCRYPT))) {
TEST_info("Split encrypt failed @ operation %d", i);
return 0;
int delta;
b = BIO_new(BIO_f_cipher());
+ if (!TEST_ptr(b))
+ return 0;
if (!TEST_true(BIO_set_cipher(b, cipher, key, iv, ENCRYPT))) {
TEST_info("Small chunk encrypt failed @ operation %d", i);
return 0;
/* reference output for single-chunk operation */
b = BIO_new(BIO_f_cipher());
+ if (!TEST_ptr(b))
+ return 0;
if (!TEST_true(BIO_set_cipher(b, cipher, key, iv, DECRYPT)))
return 0;
/* Use original reference output as input */
/* perform split operations and compare to reference */
for (i = 1; i < lref; i++) {
b = BIO_new(BIO_f_cipher());
+ if (!TEST_ptr(b))
+ return 0;
if (!TEST_true(BIO_set_cipher(b, cipher, key, iv, DECRYPT))) {
TEST_info("Split decrypt failed @ operation %d", i);
return 0;
int delta;
b = BIO_new(BIO_f_cipher());
+ if (!TEST_ptr(b))
+ return 0;
if (!TEST_true(BIO_set_cipher(b, cipher, key, iv, DECRYPT))) {
TEST_info("Small chunk decrypt failed @ operation %d", i);
return 0;