summaryrefslogtreecommitdiffstats
path: root/apps/req.c
diff options
context:
space:
mode:
authorPhilip Prindeville <philipp@redfish-solutions.com>2021-12-22 06:00:38 +0100
committerTomas Mraz <tomas@openssl.org>2022-01-21 15:44:28 +0100
commite1cd94f2dca4056ce042c62b89c468dffc088033 (patch)
treeee3ca7b476be8d96f92109f03c419b9fd0d11b27 /apps/req.c
parentLEGACY PROV: Reimplement the ERR building blocks in upcall terms (diff)
downloadopenssl-e1cd94f2dca4056ce042c62b89c468dffc088033.tar.xz
openssl-e1cd94f2dca4056ce042c62b89c468dffc088033.zip
Standardize progress callback for dhparam, dsaparam, etc.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17359)
Diffstat (limited to 'apps/req.c')
-rw-r--r--apps/req.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/apps/req.c b/apps/req.c
index eaff69faa4..45de46d393 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -62,7 +62,6 @@ static int add_attribute_object(X509_REQ *req, char *text, const char *def,
static int add_DN_object(X509_NAME *n, char *text, const char *def,
char *value, int nid, int n_min, int n_max,
unsigned long chtype, int mval);
-static int genpkey_cb(EVP_PKEY_CTX *ctx);
static int build_data(char *text, const char *def, char *value,
int n_min, int n_max, char *buf, const int buf_size,
const char *desc1, const char *desc2);
@@ -663,7 +662,7 @@ int req_main(int argc, char **argv)
}
}
- EVP_PKEY_CTX_set_cb(genctx, genpkey_cb);
+ EVP_PKEY_CTX_set_cb(genctx, progress_cb);
EVP_PKEY_CTX_set_app_data(genctx, bio_err);
pkey = app_keygen(genctx, keyalgstr, newkey_len, verbose);
@@ -1649,21 +1648,3 @@ static EVP_PKEY_CTX *set_keygen_ctx(const char *gstr,
return gctx;
}
-static int genpkey_cb(EVP_PKEY_CTX *ctx)
-{
- char c = '*';
- BIO *b = EVP_PKEY_CTX_get_app_data(ctx);
- int p;
- p = EVP_PKEY_CTX_get_keygen_info(ctx, 0);
- if (p == 0)
- c = '.';
- if (p == 1)
- c = '+';
- if (p == 2)
- c = '*';
- if (p == 3)
- c = '\n';
- BIO_write(b, &c, 1);
- (void)BIO_flush(b);
- return 1;
-}