diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2018-08-16 12:36:01 +1000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-02-11 15:31:51 +0100 |
commit | a43ce58f5569a160272c492c680f2e42d38ec769 (patch) | |
tree | acfaac32bee9b8e5dd832fbb49f95709c3b9741e /test/x509_check_cert_pkey_test.c | |
parent | 9d5560331d86c6463e965321f774e4eed582ce0b (diff) | |
download | openssl-new-a43ce58f5569a160272c492c680f2e42d38ec769.tar.gz |
Updated test command line parsing to support commmon commands
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6975)
Diffstat (limited to 'test/x509_check_cert_pkey_test.c')
-rw-r--r-- | test/x509_check_cert_pkey_test.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/test/x509_check_cert_pkey_test.c b/test/x509_check_cert_pkey_test.c index 92a7777054..434054f8e4 100644 --- a/test/x509_check_cert_pkey_test.c +++ b/test/x509_check_cert_pkey_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. * * 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 @@ -106,14 +106,25 @@ failed: return ret; } +const OPTIONS *test_get_options(void) +{ + enum { OPT_TEST_ENUM }; + static const OPTIONS test_options[] = { + OPT_TEST_OPTIONS_WITH_EXTRA_USAGE("certname key.pem type expected\n"), + { OPT_HELP_STR, 1, '-', "certname\tCertificate filename .pem/.req\n" }, + { OPT_HELP_STR, 1, '-', "type\t\tvalue must be 'pem' or 'req'\n" }, + { OPT_HELP_STR, 1, '-', "expected\tthe expected return value\n" }, + { NULL } + }; + return test_options; +} + int setup_tests(void) { if (!TEST_ptr(c = test_get_argument(0)) || !TEST_ptr(k = test_get_argument(1)) || !TEST_ptr(t = test_get_argument(2)) || !TEST_ptr(e = test_get_argument(3))) { - TEST_note("usage: x509_check_cert_pkey cert.pem|cert.req" - " key.pem cert|req <expected>"); return 0; } |