diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-09-13 09:32:32 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-09-13 09:54:42 +0200 |
commit | dd3780e2468e47a66d877e85b83928406e0b2f54 (patch) | |
tree | 30dce8189e50c688b07651314ace597a0cf09040 /lib/nettle/pk.c | |
parent | d5075bcff6e0c66014ed279248f27f0cdb275a02 (diff) | |
download | gnutls-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.c | 5 |
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) { |