From a0fe9b0481eb85667e99b987070af13311a95e54 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Mon, 8 Dec 2014 19:48:38 +0100 Subject: [PATCH] (Fgnutls_peer_status): Return the DH prime bits for the connection --- src/ChangeLog | 2 ++ src/gnutls.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 70b1bb001a9..b791d18bccb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * gnutls.c (gnutls_certificate_details): The :signature isn't that useful, so remove it. (gnutls_certificate_details): Clean up whitespace slightly. + (Fgnutls_peer_status): Return the Diffie-Hellman prime bits for + the connection. 2014-12-07 Jan Djärv diff --git a/src/gnutls.c b/src/gnutls.c index c4d85a2030e..2006bbcef0e 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -1029,6 +1029,15 @@ The return value is a property list with top-level keys :warnings and (intern (":certificate"), gnutls_certificate_details (XPROCESS (proc)->gnutls_certificate))); + /* Diffie-Hellman prime bits. */ + { + int bits = gnutls_dh_get_prime_bits (XPROCESS (proc)->gnutls_state); + if (bits > 0) + result = nconc2 (result, list2 + (intern (":diffie-hellman-prime-bits"), + make_number (bits))); + } + return result; } -- 2.39.2