Lines Matching refs:cdat
552 CIPHER_DATA *cdat; in cipher_test_init() local
576 if (!TEST_ptr(cdat = OPENSSL_zalloc(sizeof(*cdat)))) in cipher_test_init()
579 cdat->cipher = cipher; in cipher_test_init()
580 cdat->fetched_cipher = fetched_cipher; in cipher_test_init()
581 cdat->enc = -1; in cipher_test_init()
584 cdat->aead = m != 0 ? m : -1; in cipher_test_init()
586 cdat->aead = 0; in cipher_test_init()
588 t->data = cdat; in cipher_test_init()
597 CIPHER_DATA *cdat = t->data; in cipher_test_cleanup() local
599 OPENSSL_free(cdat->key); in cipher_test_cleanup()
600 OPENSSL_free(cdat->iv); in cipher_test_cleanup()
601 OPENSSL_free(cdat->next_iv); in cipher_test_cleanup()
602 OPENSSL_free(cdat->ciphertext); in cipher_test_cleanup()
603 OPENSSL_free(cdat->plaintext); in cipher_test_cleanup()
605 OPENSSL_free(cdat->aad[i]); in cipher_test_cleanup()
606 OPENSSL_free(cdat->tag); in cipher_test_cleanup()
607 OPENSSL_free(cdat->mac_key); in cipher_test_cleanup()
608 EVP_CIPHER_free(cdat->fetched_cipher); in cipher_test_cleanup()
614 CIPHER_DATA *cdat = t->data; in cipher_test_parse() local
618 return parse_bin(value, &cdat->key, &cdat->key_len); in cipher_test_parse()
623 cdat->rounds = (unsigned int)i; in cipher_test_parse()
627 return parse_bin(value, &cdat->iv, &cdat->iv_len); in cipher_test_parse()
629 return parse_bin(value, &cdat->next_iv, &cdat->iv_len); in cipher_test_parse()
631 return parse_bin(value, &cdat->plaintext, &cdat->plaintext_len); in cipher_test_parse()
633 return parse_bin(value, &cdat->ciphertext, &cdat->ciphertext_len); in cipher_test_parse()
638 cdat->key_bits = (size_t)i; in cipher_test_parse()
641 if (cdat->aead) { in cipher_test_parse()
645 cdat->tls_aad = tls_aad = 1; in cipher_test_parse()
648 if (cdat->aad[i] == NULL) in cipher_test_parse()
649 return parse_bin(value, &cdat->aad[i], &cdat->aad_len[i]); in cipher_test_parse()
654 return parse_bin(value, &cdat->tag, &cdat->tag_len); in cipher_test_parse()
657 cdat->tag_late = 1; in cipher_test_parse()
659 cdat->tag_late = 0; in cipher_test_parse()
665 return parse_bin(value, &cdat->mac_key, &cdat->mac_key_len); in cipher_test_parse()
669 cdat->tls_version = (int)strtol(value, &endptr, 0); in cipher_test_parse()
676 cdat->enc = 1; in cipher_test_parse()
678 cdat->enc = 0; in cipher_test_parse()
684 cdat->cts_mode = value; in cipher_test_parse()
1015 CIPHER_DATA *cdat = t->data; in cipher_test_run() local
1019 if (!cdat->key) { in cipher_test_run()
1023 if (!cdat->iv && EVP_CIPHER_get_iv_length(cdat->cipher)) { in cipher_test_run()
1025 if (EVP_CIPHER_get_mode(cdat->cipher) != EVP_CIPH_WRAP_MODE) { in cipher_test_run()
1030 if (cdat->aead && cdat->tag == NULL && !cdat->tls_aad) { in cipher_test_run()
1051 if (cdat->enc) { in cipher_test_run()
1060 if (cdat->enc != 1) { in cipher_test_run()
1076 if (cdat->aead == EVP_CIPH_CCM_MODE in cipher_test_run()
1077 || cdat->aead == EVP_CIPH_CBC_MODE in cipher_test_run()
1078 || (cdat->aead == -1 in cipher_test_run()
1079 && EVP_CIPHER_get_mode(cdat->cipher) == EVP_CIPH_STREAM_CIPHER) in cipher_test_run()
1080 || ((EVP_CIPHER_get_flags(cdat->cipher) & EVP_CIPH_FLAG_CTS) != 0) in cipher_test_run()
1081 || EVP_CIPHER_get_mode(cdat->cipher) == EVP_CIPH_SIV_MODE in cipher_test_run()
1082 || EVP_CIPHER_get_mode(cdat->cipher) == EVP_CIPH_XTS_MODE in cipher_test_run()
1083 || EVP_CIPHER_get_mode(cdat->cipher) == EVP_CIPH_WRAP_MODE) in cipher_test_run()