diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-08-04 09:06:32 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-08-04 11:08:51 +0200 |
commit | 68fc06c0a963fe1cd3e907dec1e2571c457f953a (patch) | |
tree | 0b00afd7c1b666b13c55e2bd1cf803fdba8ea595 /lib/nettle/pk.c | |
parent | f10289f6d8c04111d3a7777f4ed9710a8114ef2f (diff) | |
download | gnutls-68fc06c0a963fe1cd3e907dec1e2571c457f953a.tar.gz |
introduced error code GNUTLS_E_PK_INVALID_PUBKEY_PARAMS
This is being use to indicate errors in the public key parameters
such as the RSA-PSS salt size or digest algorithm.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/nettle/pk.c')
-rw-r--r-- | lib/nettle/pk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/nettle/pk.c b/lib/nettle/pk.c index f32a82d8e7..cd7dce243b 100644 --- a/lib/nettle/pk.c +++ b/lib/nettle/pk.c @@ -530,7 +530,7 @@ _rsa_pss_sign_digest_tr(gnutls_digest_algorithm_t dig, } /* This is also checked in pss_encode_mgf1, but error out earlier. */ - CHECK_INVALID_RSA_PSS_PARAMS(hash_size, salt_size, pub->size, GNUTLS_E_ILLEGAL_PARAMETER); + CHECK_INVALID_RSA_PSS_PARAMS(hash_size, salt_size, pub->size, GNUTLS_E_PK_INVALID_PUBKEY_PARAMS); if (salt_size > 0) { salt = gnutls_malloc(salt_size); @@ -2352,7 +2352,7 @@ wrap_nettle_pk_fixup(gnutls_pk_algorithm_t algo, /* sanity check for private key */ CHECK_INVALID_RSA_PSS_PARAMS(gnutls_hash_get_len(params->spki.rsa_pss_dig), params->spki.salt_size, pub_size, - GNUTLS_E_PK_INVALID_PRIVKEY); + GNUTLS_E_PK_INVALID_PUBKEY_PARAMS); } } |