version 1.10, 2018/02/07 04:57:06 |
version 1.11, 2018/02/07 05:47:55 |
|
|
badarg = 1; |
badarg = 1; |
|
|
if (badarg) { |
if (badarg) { |
bad: |
bad: |
BIO_printf(bio_err, "Usage: genpkey [options]\n"); |
BIO_printf(bio_err, "Usage: genpkey [options]\n"); |
BIO_printf(bio_err, "where options may be\n"); |
BIO_printf(bio_err, "where options may be\n"); |
BIO_printf(bio_err, "-out file output file\n"); |
BIO_printf(bio_err, "-out file output file\n"); |
|
|
} |
} |
ret = 0; |
ret = 0; |
|
|
end: |
end: |
EVP_PKEY_free(pkey); |
EVP_PKEY_free(pkey); |
EVP_PKEY_CTX_free(ctx); |
EVP_PKEY_CTX_free(ctx); |
BIO_free_all(out); |
BIO_free_all(out); |
|
|
*pctx = ctx; |
*pctx = ctx; |
return 1; |
return 1; |
|
|
err: |
err: |
BIO_puts(err, "Error initializing context\n"); |
BIO_puts(err, "Error initializing context\n"); |
ERR_print_errors(err); |
ERR_print_errors(err); |
EVP_PKEY_CTX_free(ctx); |
EVP_PKEY_CTX_free(ctx); |
|
|
*pctx = ctx; |
*pctx = ctx; |
return 1; |
return 1; |
|
|
err: |
err: |
BIO_printf(err, "Error initializing %s context\n", algname); |
BIO_printf(err, "Error initializing %s context\n", algname); |
ERR_print_errors(err); |
ERR_print_errors(err); |
EVP_PKEY_CTX_free(ctx); |
EVP_PKEY_CTX_free(ctx); |