summaryrefslogtreecommitdiff
path: root/lib/nettle/pk.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-09-13 09:32:32 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-09-13 09:54:42 +0200
commitdd3780e2468e47a66d877e85b83928406e0b2f54 (patch)
tree30dce8189e50c688b07651314ace597a0cf09040 /lib/nettle/pk.c
parentd5075bcff6e0c66014ed279248f27f0cdb275a02 (diff)
downloadgnutls-dd3780e2468e47a66d877e85b83928406e0b2f54.tar.gz
Made the new key generation API flexible to allow extensions in the future
Diffstat (limited to 'lib/nettle/pk.c')
-rw-r--r--lib/nettle/pk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/nettle/pk.c b/lib/nettle/pk.c
index 0d9869a300..0b90639267 100644
--- a/lib/nettle/pk.c
+++ b/lib/nettle/pk.c
@@ -1266,6 +1266,11 @@ wrap_nettle_pk_generate_keys(gnutls_pk_algorithm_t algo,
if ((params->flags & GNUTLS_PK_FLAG_PROVABLE) || _gnutls_fips_mode_enabled() != 0) {
params->flags |= GNUTLS_PK_FLAG_PROVABLE;
+ if (params->palgo != 0 && params->palgo != GNUTLS_DIG_SHA384) {
+ ret = GNUTLS_E_INVALID_REQUEST;
+ goto rsa_fail;
+ }
+
params->palgo = GNUTLS_DIG_SHA384;
if (params->seed_size) {