Skip unsupported ciphers in evp_test.
authorDr. Stephen Henson <steve@openssl.org>
Thu, 26 Feb 2015 19:26:53 +0000 (19:26 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 27 Feb 2015 00:18:10 +0000 (00:18 +0000)
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/evp/evp_test.c

index 7d15332..9726993 100644 (file)
@@ -638,8 +638,14 @@ static int cipher_test_init(struct evp_test *t, const char *alg)
     const EVP_CIPHER *cipher;
     struct cipher_data *cdat = t->data;
     cipher = EVP_get_cipherbyname(alg);
-    if (!cipher)
+    if (!cipher) {
+        /* If alg has an OID assume disabled algorithm */
+        if (OBJ_sn2nid(alg) != NID_undef || OBJ_ln2nid(alg) != NID_undef) {
+            t->skip = 1;
+            return 1;
+        }
         return 0;
+    }
     cdat = OPENSSL_malloc(sizeof(struct cipher_data));
     cdat->cipher = cipher;
     cdat->enc = -1;