blake2b: add EVP_MAC API
[openssl.git] / test / afalgtest.c
index bf9054554ae8fc627ca8d67fb82b92feabc83982..16e5dbd129eddfc544af33774742e8cdb81d5698 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
  *
- * Licensed under the OpenSSL license (the "License").  You may not use
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
@@ -128,14 +128,14 @@ int global_init(void)
 int setup_tests(void)
 {
 #ifndef OPENSSL_NO_ENGINE
-    if (!TEST_ptr(e = ENGINE_by_id("afalg"))) {
+    if ((e = ENGINE_by_id("afalg")) == NULL) {
         /* Probably a platform env issue, not a test failure. */
-        TEST_info("Can't load AFALG engine, you might want to check $OPENSSL_ENGINES");
-        return 0;
-    }
+        TEST_info("Can't load AFALG engine");
+    } else {
 # ifndef OPENSSL_NO_AFALGENG
-    ADD_ALL_TESTS(test_afalg_aes_cbc, 3);
+        ADD_ALL_TESTS(test_afalg_aes_cbc, 3);
 # endif
+    }
 #endif
 
     return 1;