summaryrefslogtreecommitdiff
path: root/lib/dh.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-18 11:31:52 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-18 11:56:30 +0200
commit6f62adb1ce12262111a9fdcb2a75040d5c23c3cb (patch)
treec6e119ba2ffc9cdbcb4c52ad88d2befe0726cec6 /lib/dh.c
parentaa86ea26580aafacfe2a338078587a47d15d01ad (diff)
downloadgnutls-6f62adb1ce12262111a9fdcb2a75040d5c23c3cb.tar.gz
gnutls_session_get_flags: introduced GNUTLS_SFLAGS_RFC7919
This allows checking whether the DHE parameters used were negotiated using RFC7919. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/dh.c')
-rw-r--r--lib/dh.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dh.c b/lib/dh.c
index 4686736946..c8e84680f9 100644
--- a/lib/dh.c
+++ b/lib/dh.c
@@ -79,6 +79,7 @@ _gnutls_figure_dh_params(gnutls_session_t session, gnutls_dh_params_t dh_params,
group = get_group(session);
params.deinit = 0;
+ session->internals.used_ffdhe = 0;
/* if we negotiated RFC7919 FFDHE */
if (group && group->pk == GNUTLS_PK_DH) {
@@ -100,6 +101,7 @@ _gnutls_figure_dh_params(gnutls_session_t session, gnutls_dh_params_t dh_params,
goto cleanup;
}
+ session->internals.used_ffdhe = 1;
q_bits = *session->internals.priorities->groups.entry[i]->q_bits;
goto finished;
}