version 1.4, 2015/08/22 16:36:05 |
version 1.5, 2015/09/11 14:30:23 |
|
|
static int dh_cb(int p, int n, BN_GENCB * cb); |
static int dh_cb(int p, int n, BN_GENCB * cb); |
|
|
static struct { |
static struct { |
#ifndef OPENSSL_NO_ENGINE |
|
char *engine; |
|
#endif |
|
int g; |
int g; |
char *outfile; |
char *outfile; |
} gendh_config; |
} gendh_config; |
|
|
.value = 5, |
.value = 5, |
.opt.value = &gendh_config.g, |
.opt.value = &gendh_config.g, |
}, |
}, |
#ifndef OPENSSL_NO_ENGINE |
|
{ |
{ |
.name = "engine", |
|
.argname = "id", |
|
.desc = "Use the engine specified by the given identifier", |
|
.type = OPTION_ARG, |
|
.opt.arg = &gendh_config.engine, |
|
}, |
|
#endif |
|
{ |
|
.name = "out", |
.name = "out", |
.argname = "file", |
.argname = "file", |
.desc = "Output file (default stdout)", |
.desc = "Output file (default stdout)", |
|
|
gendh_usage(void) |
gendh_usage(void) |
{ |
{ |
fprintf(stderr, |
fprintf(stderr, |
"usage: gendh [-2 | -5] [-engine id] [-out file] [numbits]\n\n"); |
"usage: gendh [-2 | -5] [-out file] [numbits]\n\n"); |
options_usage(gendh_options); |
options_usage(gendh_options); |
} |
} |
|
|
|
|
goto end; |
goto end; |
} |
} |
} |
} |
|
|
#ifndef OPENSSL_NO_ENGINE |
|
setup_engine(bio_err, gendh_config.engine, 0); |
|
#endif |
|
|
|
out = BIO_new(BIO_s_file()); |
out = BIO_new(BIO_s_file()); |
if (out == NULL) { |
if (out == NULL) { |