• Home
  • Raw
  • Download

Lines Matching refs:test_case

210     const srtp_cipher_test_case_t *test_case = test_data;  in srtp_cipher_type_test()  local
227 if (test_case == NULL) { in srtp_cipher_type_test()
235 while (test_case != NULL) { in srtp_cipher_type_test()
237 status = srtp_cipher_type_alloc(ct, &c, test_case->key_length_octets, in srtp_cipher_type_test()
238 test_case->tag_length_octets); in srtp_cipher_type_test()
249 status = srtp_cipher_init(c, test_case->key); in srtp_cipher_type_test()
256 if (test_case->ciphertext_length_octets > SELF_TEST_BUF_OCTETS) { in srtp_cipher_type_test()
260 for (k = 0; k < test_case->plaintext_length_octets; k++) { in srtp_cipher_type_test()
261 buffer[k] = test_case->plaintext[k]; in srtp_cipher_type_test()
266 buffer, test_case->plaintext_length_octets)); in srtp_cipher_type_test()
269 status = srtp_cipher_set_iv(c, (uint8_t *)test_case->idx, in srtp_cipher_type_test()
279 srtp_octet_string_hex_string(test_case->idx, 12)); in srtp_cipher_type_test()
284 status = srtp_cipher_set_aad(c, test_case->aad, in srtp_cipher_type_test()
285 test_case->aad_length_octets); in srtp_cipher_type_test()
292 test_case->aad, test_case->aad_length_octets)); in srtp_cipher_type_test()
296 len = test_case->plaintext_length_octets; in srtp_cipher_type_test()
318 buffer, test_case->ciphertext_length_octets)); in srtp_cipher_type_test()
321 if (len != test_case->ciphertext_length_octets) { in srtp_cipher_type_test()
326 for (k = 0; k < test_case->ciphertext_length_octets; k++) { in srtp_cipher_type_test()
327 if (buffer[k] != test_case->ciphertext[k]) { in srtp_cipher_type_test()
337 buffer, 2 * test_case->plaintext_length_octets)); in srtp_cipher_type_test()
340 test_case->ciphertext, in srtp_cipher_type_test()
341 2 * test_case->plaintext_length_octets)); in srtp_cipher_type_test()
353 status = srtp_cipher_init(c, test_case->key); in srtp_cipher_type_test()
360 if (test_case->ciphertext_length_octets > SELF_TEST_BUF_OCTETS) { in srtp_cipher_type_test()
364 for (k = 0; k < test_case->ciphertext_length_octets; k++) { in srtp_cipher_type_test()
365 buffer[k] = test_case->ciphertext[k]; in srtp_cipher_type_test()
370 buffer, test_case->plaintext_length_octets)); in srtp_cipher_type_test()
373 status = srtp_cipher_set_iv(c, (uint8_t *)test_case->idx, in srtp_cipher_type_test()
385 status = srtp_cipher_set_aad(c, test_case->aad, in srtp_cipher_type_test()
386 test_case->aad_length_octets); in srtp_cipher_type_test()
393 test_case->aad, test_case->aad_length_octets)); in srtp_cipher_type_test()
397 len = test_case->ciphertext_length_octets; in srtp_cipher_type_test()
406 buffer, test_case->plaintext_length_octets)); in srtp_cipher_type_test()
409 if (len != test_case->plaintext_length_octets) { in srtp_cipher_type_test()
414 for (k = 0; k < test_case->plaintext_length_octets; k++) { in srtp_cipher_type_test()
415 if (buffer[k] != test_case->plaintext[k]) { in srtp_cipher_type_test()
424 buffer, 2 * test_case->plaintext_length_octets)); in srtp_cipher_type_test()
427 test_case->plaintext, in srtp_cipher_type_test()
428 2 * test_case->plaintext_length_octets)); in srtp_cipher_type_test()
444 test_case = test_case->next_test_case; in srtp_cipher_type_test()
451 test_case = test_data; in srtp_cipher_type_test()
452 status = srtp_cipher_type_alloc(ct, &c, test_case->key_length_octets, in srtp_cipher_type_test()
453 test_case->tag_length_octets); in srtp_cipher_type_test()
478 if (test_case->key_length_octets > MAX_KEY_LEN) { in srtp_cipher_type_test()
482 srtp_cipher_rand_for_tests(key, test_case->key_length_octets); in srtp_cipher_type_test()
495 status = srtp_cipher_set_iv(c, (uint8_t *)test_case->idx, in srtp_cipher_type_test()
507 status = srtp_cipher_set_aad(c, test_case->aad, in srtp_cipher_type_test()
508 test_case->aad_length_octets); in srtp_cipher_type_test()
515 test_case->aad, test_case->aad_length_octets)); in srtp_cipher_type_test()
549 status = srtp_cipher_set_iv(c, (uint8_t *)test_case->idx, in srtp_cipher_type_test()
560 status = srtp_cipher_set_aad(c, test_case->aad, in srtp_cipher_type_test()
561 test_case->aad_length_octets); in srtp_cipher_type_test()
568 test_case->aad, test_case->aad_length_octets)); in srtp_cipher_type_test()