diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-01-26 09:31:42 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-01-26 10:11:30 +0100 |
commit | 1a90bc32fe87b2859f302b77619e2fece5c1ad82 (patch) | |
tree | 4d95ba6163df5a0165eed5373b149bdb3a060a76 /lib/auth | |
parent | 52d140d6ee54544ba01507c75df832e92870f877 (diff) | |
download | gnutls-1a90bc32fe87b2859f302b77619e2fece5c1ad82.tar.gz |
updated prototypes of _gnutls_mpi_set, _gnutls_mpi_set_ui,, _gnutls_mpi_copy
Diffstat (limited to 'lib/auth')
-rw-r--r-- | lib/auth/srp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/auth/srp.c b/lib/auth/srp.c index 7e579e5cc0..c142081aa9 100644 --- a/lib/auth/srp.c +++ b/lib/auth/srp.c @@ -738,7 +738,12 @@ group_check_g_n(gnutls_session_t session, bigint_t g, bigint_t n) /* q = q/2, remember that q is divisible by 2 (prime - 1) */ - _gnutls_mpi_set_ui(two, 2); + ret = _gnutls_mpi_set_ui(two, 2); + if (ret < 0) { + gnutls_assert(); + goto error; + } + _gnutls_mpi_div(q, q, two); if (_gnutls_prime_check(q) != 0) { @@ -746,7 +751,8 @@ group_check_g_n(gnutls_session_t session, bigint_t g, bigint_t n) */ _gnutls_mpi_log("no prime Q: ", q); gnutls_assert(); - return GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER; + ret = GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER; + goto error; } /* We also check whether g is a generator, |