Lines Matching defs:cipher
241 static int encrypt_decrypt(const EVP_CIPHER *cipher, const unsigned char *msg,
251 || !TEST_true(EVP_CipherInit_ex(ctx, cipher, NULL, key, NULL, 1))
254 || !TEST_true(EVP_CipherInit_ex(ctx, cipher, NULL, key, NULL, 0))
266 static int test_cipher(const EVP_CIPHER *cipher)
270 return TEST_ptr(cipher)
271 && TEST_true(encrypt_decrypt(cipher, testmsg, sizeof(testmsg)));
290 EVP_CIPHER *cipher = NULL;
297 cipher = EVP_CIPHER_fetch(ctx, id, fetch_property);
299 if (!test_cipher(cipher))
302 if (!TEST_true(EVP_CIPHER_up_ref(cipher)))
305 EVP_CIPHER_free(cipher);
307 if (!TEST_ptr_null(cipher))
312 EVP_CIPHER_free(cipher);