summaryrefslogtreecommitdiff
path: root/lib/dh.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2018-05-07 21:49:16 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2018-05-07 21:50:03 +0200
commitf03c7a038c0f44cf51c3464c6f50df7b44638928 (patch)
tree89b3a2abb6bdc5d55a459db7d9c7e5817b43b135 /lib/dh.c
parentf92ef316d3529ac3c38e697b1e41b572e1d922f3 (diff)
downloadgnutls-f03c7a038c0f44cf51c3464c6f50df7b44638928.tar.gz
handshake: use GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER consistently
Also treat GNUTLS_E_ILLEGAL_PARAMETER as a synonym if returned during a connection. Relates #442 Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'lib/dh.c')
-rw-r--r--lib/dh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dh.c b/lib/dh.c
index e71aeced8e..911e7a31f4 100644
--- a/lib/dh.c
+++ b/lib/dh.c
@@ -501,7 +501,7 @@ gnutls_dh_params_import_pkcs3(gnutls_dh_params_t params,
if (_gnutls_mpi_cmp_ui(params->params[0], 0) == 0) {
asn1_delete_structure(&c2);
- return gnutls_assert_val(GNUTLS_E_ILLEGAL_PARAMETER);
+ return gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);
}
/* read the generator
@@ -517,7 +517,7 @@ gnutls_dh_params_import_pkcs3(gnutls_dh_params_t params,
if (_gnutls_mpi_cmp_ui(params->params[1], 0) == 0) {
asn1_delete_structure(&c2);
_gnutls_mpi_release(&params->params[0]);
- return gnutls_assert_val(GNUTLS_E_ILLEGAL_PARAMETER);
+ return gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);
}
asn1_delete_structure(&c2);