version 1.5, 2015/08/22 16:36:05 |
version 1.6, 2015/09/11 14:30:23 |
|
|
#include <openssl/x509.h> |
#include <openssl/x509.h> |
|
|
static struct { |
static struct { |
#ifndef OPENSSL_NO_ENGINE |
|
char *engine; |
|
#endif |
|
char *infile; |
char *infile; |
int informat; |
int informat; |
int noout; |
int noout; |
|
|
} pkcs7_config; |
} pkcs7_config; |
|
|
static struct option pkcs7_options[] = { |
static struct option pkcs7_options[] = { |
#ifndef OPENSSL_NO_ENGINE |
|
{ |
{ |
.name = "engine", |
|
.argname = "id", |
|
.desc = "Use the engine specified by the given identifier", |
|
.type = OPTION_ARG, |
|
.opt.arg = &pkcs7_config.engine, |
|
}, |
|
#endif |
|
{ |
|
.name = "in", |
.name = "in", |
.argname = "file", |
.argname = "file", |
.desc = "Input file (default stdin)", |
.desc = "Input file (default stdin)", |
|
|
static void |
static void |
pkcs7_usage() |
pkcs7_usage() |
{ |
{ |
fprintf(stderr, "usage: pkcs7 [-engine id] [-in file] " |
fprintf(stderr, "usage: pkcs7 [-in file] " |
"[-inform DER | PEM] [-noout]\n" |
"[-inform DER | PEM] [-noout]\n" |
" [-out file] [-outform DER | PEM] [-print_certs] [-text]\n\n"); |
" [-out file] [-outform DER | PEM] [-print_certs] [-text]\n\n"); |
options_usage(pkcs7_options); |
options_usage(pkcs7_options); |
|
|
pkcs7_usage(); |
pkcs7_usage(); |
goto end; |
goto end; |
} |
} |
|
|
#ifndef OPENSSL_NO_ENGINE |
|
setup_engine(bio_err, pkcs7_config.engine, 0); |
|
#endif |
|
|
|
in = BIO_new(BIO_s_file()); |
in = BIO_new(BIO_s_file()); |
out = BIO_new(BIO_s_file()); |
out = BIO_new(BIO_s_file()); |