diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-09-26 16:44:39 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-02-19 15:29:34 +0100 |
commit | 7b9462d7b0b4bac2e1abf2716856cb4fdb1f688c (patch) | |
tree | 2631d8f0ab6b21a9ebaab3fcae63cf7c58b5dd41 /lib/auth/srp_kx.c | |
parent | 3509d17b952898e39601e571809437ab73284f2e (diff) | |
download | gnutls-7b9462d7b0b4bac2e1abf2716856cb4fdb1f688c.tar.gz |
kx: moved to new buffer API
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/auth/srp_kx.c')
-rw-r--r-- | lib/auth/srp_kx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/auth/srp_kx.c b/lib/auth/srp_kx.c index 582434aa91..0e00642fad 100644 --- a/lib/auth/srp_kx.c +++ b/lib/auth/srp_kx.c @@ -125,6 +125,7 @@ _gnutls_gen_srp_server_kx(gnutls_session_t session, size_t tmp_size; gnutls_ext_priv_data_t epriv; srp_ext_st *priv; + unsigned init_pos; ret = _gnutls_hello_ext_get_sdata(session, GNUTLS_EXTENSION_SRP, @@ -158,6 +159,8 @@ _gnutls_gen_srp_server_kx(gnutls_session_t session, return ret; } + init_pos = data->length; + /* copy from pwd_entry to local variables (actually in session) */ tmp_size = pwd_entry->g.size; if (_gnutls_mpi_init_scan_nz(&G, pwd_entry->g.data, tmp_size) < 0) { @@ -231,7 +234,7 @@ _gnutls_gen_srp_server_kx(gnutls_session_t session, _gnutls_mpi_log("SRP B: ", B); - ret = data->length; + ret = data->length - init_pos; cleanup: _gnutls_srp_entry_free(pwd_entry); |