X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;f=test_mgm.c;h=31f8570e82d6b6221aa06ff44aee2154b5cb68f4;hb=ebf9c1fec3c58cdf7e2b56220d384ab90647f966;hp=b61a8e3d5275003eb33e70158e7c682eea65c22f;hpb=39dc6de6a9474e10560ebfb0a9cecc05867b9c7b;p=openssl-gost%2Fengine.git diff --git a/test_mgm.c b/test_mgm.c index b61a8e3..31f8570 100644 --- a/test_mgm.c +++ b/test_mgm.c @@ -243,7 +243,9 @@ int main(void) for (t = testcases; t->sn; t++) { int small; - const EVP_CIPHER *ciph = EVP_get_cipherbyname(t->sn); + const EVP_CIPHER *ciph_eng = EVP_get_cipherbyname(t->sn); + EVP_CIPHER *ciph_prov = EVP_CIPHER_fetch(NULL, t->sn, NULL); + const EVP_CIPHER *ciph = ciph_eng ? ciph_eng : ciph_prov; const char *name; if (!ciph) { printf("failed to load %s\n", t->sn); @@ -256,6 +258,7 @@ int main(void) ret |= test_block(ciph, name, t->nonce, t->nonce_len, t->aad, t->aad_len, t->plaintext, t->ptext_len, t->expected, t->expected_tag, t->key, small); + EVP_CIPHER_free(ciph_prov); } if (ret) {