summaryrefslogtreecommitdiffstats
path: root/apps/dsaparam.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dsaparam.c')
-rw-r--r--apps/dsaparam.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/apps/dsaparam.c b/apps/dsaparam.c
index 08f912340a..708cb9a648 100644
--- a/apps/dsaparam.c
+++ b/apps/dsaparam.c
@@ -11,7 +11,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include "apps.h"
#include <time.h>
#include <string.h>
#include "apps.h"
@@ -25,8 +24,6 @@
static int verbose = 0;
-static int gendsa_cb(EVP_PKEY_CTX *ctx);
-
typedef enum OPTION_choice {
OPT_COMMON,
OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_TEXT,
@@ -160,9 +157,9 @@ int dsaparam_main(int argc, char **argv)
" Your key size is %d! Larger key size may behave not as expected.\n",
OPENSSL_DSA_MAX_MODULUS_BITS, numbits);
- EVP_PKEY_CTX_set_cb(ctx, gendsa_cb);
EVP_PKEY_CTX_set_app_data(ctx, bio_err);
if (verbose) {
+ EVP_PKEY_CTX_set_cb(ctx, progress_cb);
BIO_printf(bio_err, "Generating DSA parameters, %d bit long prime\n",
num);
BIO_printf(bio_err, "This could take some time\n");
@@ -235,21 +232,3 @@ int dsaparam_main(int argc, char **argv)
return ret;
}
-static int gendsa_cb(EVP_PKEY_CTX *ctx)
-{
- static const char symbols[] = ".+*\n";
- int p;
- char c;
- BIO *b;
-
- if (!verbose)
- return 1;
-
- b = EVP_PKEY_CTX_get_app_data(ctx);
- p = EVP_PKEY_CTX_get_keygen_info(ctx, 0);
- c = (p >= 0 && (size_t)p < sizeof(symbols) - 1) ? symbols[p] : '?';
-
- BIO_write(b, &c, 1);
- (void)BIO_flush(b);
- return 1;
-}