diff options
author | Rich Salz <rsalz@akamai.com> | 2014-07-10 00:02:18 -0400 |
---|---|---|
committer | Rich Salz <rsalz@akamai.com> | 2014-07-14 18:03:33 -0400 |
commit | 6aaebc596eb10f0d8652046d4671960ef58b9328 (patch) | |
tree | a84618ebecbfdd8c56fec547a65d781601310536 | |
parent | 90c81ee4da5879ae6f78040792a3ec3c3c93569c (diff) | |
download | openssl-new-6aaebc596eb10f0d8652046d4671960ef58b9328.tar.gz |
add working temp files
-rw-r--r-- | apps/opt-sample | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/apps/opt-sample b/apps/opt-sample new file mode 100644 index 0000000000..1d33e799df --- /dev/null +++ b/apps/opt-sample @@ -0,0 +1,38 @@ + +enum options { + OPT_ERR = -1, OPT_EOF = 0, +}; +static OPTIONS options[] = { + { "inform", OPT_INFORM, 'F' }, + { "outform", OPT_OUTFORM, 'F' }, +#ifndef OPENSSL_NO_ENGINE + { "engine", OPT_ENGINE, 's' }, +#endif + { "in", OPT_IN, '<' }, + { "out", OPT_OUT, '>' }, + { NULL } +}; + + enum options o; + char* prog; + + prog = opt_init(argc, argv, options); + while ((o = opt_next()) != OPT_EOF) { + switch (o) { + case OPT_EOF: + case OPT_ERR: + BIO_printf(bio_err,"Valid options are:\n"); + printhelp(._help); + goto end; + case OPT_INFORM: + opt_format(opt_arg(), 1, &informat); + break; + case OPT_IN: + infile = opt_arg(); + break; + case OPT_OUTFORM: + opt_format(opt_arg(), 1, &outformat); + break; + case OPT_OUT: + outfile= opt_arg(); + break; |