TEST: Optionally silence OpenSSL::Test::setup()
[openssl.git] / test / cmsapitest.c
index a79ae8c043d67bd9d98154e2f73c51eec7d07e9a..3ab1b82f963d01b362e6216b30ab2b06c4e7beee 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the OpenSSL license (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
+ */
+
 #include <string.h>
 
 #include <openssl/cms.h>
@@ -49,11 +58,18 @@ static int test_encrypt_decrypt(void)
     return testresult;
 }
 
+OPT_TEST_DECLARE_USAGE("certfile privkeyfile\n")
+
 int setup_tests(void)
 {
     char *certin = NULL, *privkeyin = NULL;
     BIO *certbio = NULL, *privkeybio = NULL;
 
+    if (!test_skip_common_options()) {
+        TEST_error("Error parsing test options\n");
+        return 0;
+    }
+
     if (!TEST_ptr(certin = test_get_argument(0))
             || !TEST_ptr(privkeyin = test_get_argument(1)))
         return 0;