Lines Matching refs:t

186 static int test_bio_base64_run(test_case *t, int llen, int wscnt)  in test_bio_base64_run()  argument
201 if (t->encoded != NULL) in test_bio_base64_run()
202 raw = OPENSSL_zalloc(t->bytes); in test_bio_base64_run()
204 raw = genbytes(t->bytes); in test_bio_base64_run()
206 if (raw == NULL && t->bytes > 0) { in test_bio_base64_run()
211 out_len = t->bytes + 1024; in test_bio_base64_run()
219 elen = genb64(t->prefix, t->suffix, raw, t->bytes, t->trunc, t->encoded, in test_bio_base64_run()
228 if (t->retry) in test_bio_base64_run()
239 if (t->retry) in test_bio_base64_run()
245 if (t->no_nl) in test_bio_base64_run()
268 if (t->retry) in test_bio_base64_run()
290 if (t->trunc > 0 in test_bio_base64_run()
291 || ((t->bytes > 0 || t->no_nl) && *t->suffix && *t->suffix != '-') in test_bio_base64_run()
292 || (t->no_nl && *t->prefix)) { in test_bio_base64_run()
296 || n != (int) t->bytes in test_bio_base64_run()
310 static int generic_case(test_case *t, int verbose) in generic_case() argument
318 int extra = t->no_nl ? 64 : 0; in generic_case()
324 if (test_bio_base64_run(t, *llen + extra, *wscnt) != 0) in generic_case()
329 if (*t->prefix) in generic_case()
330 fprintf(stderr, ", prefix='%s'", t->prefix); in generic_case()
331 if (t->encoded) in generic_case()
332 fprintf(stderr, ", data='%s'", t->encoded); in generic_case()
334 fprintf(stderr, ", datalen=%u", t->bytes); in generic_case()
335 if (t->trunc) in generic_case()
336 fprintf(stderr, ", trunc=%d", t->trunc); in generic_case()
337 if (*t->suffix) in generic_case()
338 fprintf(stderr, ", suffix='%s'", t->suffix); in generic_case()
341 if (t->retry) in generic_case()
343 if (t->no_nl) in generic_case()
349 if (t->encoded) in generic_case()
356 if (*llen > t->bytes + (t->bytes >> 1)) in generic_case()
370 test_case t; in test_bio_base64_generated() local
379 t.retry = quotrem(q, 2, &q); in test_bio_base64_generated()
380 t.no_nl = quotrem(q, 2, &q); in test_bio_base64_generated()
387 t.prefix = prefixes[variant]; in test_bio_base64_generated()
388 t.encoded = NULL; in test_bio_base64_generated()
389 t.bytes = lengths[lencase]; in test_bio_base64_generated()
390 t.trunc = 0; in test_bio_base64_generated()
392 t.bytes += padcase; in test_bio_base64_generated()
394 t.trunc = padcase - 2; in test_bio_base64_generated()
395 t.suffix = suffixes[variant]; in test_bio_base64_generated()
397 if (padcase != 0 && (*t.suffix && *t.suffix != '-')) { in test_bio_base64_generated()
402 return generic_case(&t, 0); in test_bio_base64_generated()
407 test_case t; in test_bio_base64_corner_case_bug() local
410 t.retry = quotrem(q, 2, &q); in test_bio_base64_corner_case_bug()
411 t.no_nl = quotrem(q, 2, &q); in test_bio_base64_corner_case_bug()
419 t.prefix = "#foo\n#bar"; in test_bio_base64_corner_case_bug()
422 t.encoded = "A\nAAA\nAAAA\n"; in test_bio_base64_corner_case_bug()
423 t.suffix = ""; in test_bio_base64_corner_case_bug()
426 t.bytes = 6; in test_bio_base64_corner_case_bug()
427 t.trunc = 0; /* ignored */ in test_bio_base64_corner_case_bug()
429 return generic_case(&t, 0); in test_bio_base64_corner_case_bug()