summaryrefslogtreecommitdiff
path: root/src/certtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/certtool.c')
-rw-r--r--src/certtool.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/certtool.c b/src/certtool.c
index d60f5eb7c4..1988aff0a4 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -222,6 +222,10 @@ generate_private_key_int (void)
if (ret < 0)
error (EXIT_FAILURE, 0, "privkey_generate: %s", gnutls_strerror (ret));
+ ret = gnutls_x509_privkey_verify_params (key);
+ if (ret < 0)
+ error (EXIT_FAILURE, 0, "privkey_verify_params: %s", gnutls_strerror (ret));
+
return key;
}
@@ -1737,9 +1741,12 @@ privkey_info (void)
if (ret < 0)
error (EXIT_FAILURE, 0, "import error: %s", gnutls_strerror (ret));
-
privkey_info_int (key);
+ ret = gnutls_x509_privkey_verify_params (key);
+ if (ret < 0)
+ fprintf (outfile, "\n** Private key parameters validation failed **\n\n");
+
if (info.fix_key != 0)
{
ret = gnutls_x509_privkey_fix (key);