version 1.12, 2019/07/14 03:30:46 |
version 1.13, 2022/01/10 12:17:49 |
|
|
#include <openssl/pem.h> |
#include <openssl/pem.h> |
|
|
struct { |
struct { |
|
int check; |
char *infile; |
char *infile; |
int noout; |
int noout; |
char *outfile; |
char *outfile; |
|
|
|
|
static const struct option pkeyparam_options[] = { |
static const struct option pkeyparam_options[] = { |
{ |
{ |
|
.name = "check", |
|
.desc = "Check validity of key parameters", |
|
.type = OPTION_FLAG, |
|
.opt.flag = &pkeyparam_config.check, |
|
}, |
|
{ |
.name = "in", |
.name = "in", |
.argname = "file", |
.argname = "file", |
.desc = "Input file (default stdin)", |
.desc = "Input file (default stdin)", |
|
|
pkeyparam_usage() |
pkeyparam_usage() |
{ |
{ |
fprintf(stderr, |
fprintf(stderr, |
"usage: pkeyparam [-in file] [-noout] [-out file] " |
"usage: pkeyparam [-check] [-in file] [-noout] [-out file] " |
"[-text]\n"); |
"[-text]\n"); |
options_usage(pkeyparam_options); |
options_usage(pkeyparam_options); |
} |
} |
|
|
ERR_print_errors(bio_err); |
ERR_print_errors(bio_err); |
goto end; |
goto end; |
} |
} |
|
|
|
#if notyet |
|
if (pkeyparam_config.check) { |
|
if (!pkey_check(out, pkey, EVP_PKEY_param_check, "Parameters")) |
|
goto end; |
|
} |
|
#endif |
|
|
if (!pkeyparam_config.noout) |
if (!pkeyparam_config.noout) |
PEM_write_bio_Parameters(out, pkey); |
PEM_write_bio_Parameters(out, pkey); |
|
|