]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - test_mgm.c
tcl_tests: ca.try: Ignore openssl crl exit status for 'corrupted CRL' test
[openssl-gost/engine.git] / test_mgm.c
index b61a8e3d5275003eb33e70158e7c682eea65c22f..31f8570e82d6b6221aa06ff44aee2154b5cb68f4 100644 (file)
@@ -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) {