diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-09-17 11:31:29 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-09-17 11:43:39 +0200 |
commit | 2a98a39d7d986f740f21fa14e54cd4d1a5d6dca4 (patch) | |
tree | a7eec2639cd811aece45b30b7227d4b05e6b1163 /lib/errors.c | |
parent | b96164f0cfcacfd5e89440f09fd844eb1e1827bc (diff) | |
download | gnutls-2a98a39d7d986f740f21fa14e54cd4d1a5d6dca4.tar.gz |
Introduced separate error codes for invalid private and public keys
This allows functions like decryption and verification to report
the specific issue they encountered on public key error.
The new codes are GNUTLS_E_PK_INVALID_PUBKEY and GNUTLS_E_PK_INVALID_PRIVKEY
Diffstat (limited to 'lib/errors.c')
-rw-r--r-- | lib/errors.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/errors.c b/lib/errors.c index 05ef2e3171..5e4610bf8f 100644 --- a/lib/errors.c +++ b/lib/errors.c @@ -391,6 +391,10 @@ static const gnutls_error_entry error_entries[] = { GNUTLS_E_IDNA_ERROR), ERROR_ENTRY(N_("Cannot obtain resumption parameters while handshake is incomplete."), GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE), + ERROR_ENTRY(N_("The obtained public key is invalid."), + GNUTLS_E_PK_INVALID_PUBKEY), + ERROR_ENTRY(N_("The private key is invalid."), + GNUTLS_E_PK_INVALID_PRIVKEY), {NULL, NULL, 0} }; |