From: Lars Magne Ingebrigtsen Date: Mon, 8 Dec 2014 18:48:38 +0000 (+0100) Subject: (Fgnutls_peer_status): Return the DH prime bits for the connection X-Git-Tag: emacs-25.0.90~2635^2~159 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a0fe9b0481eb85667e99b987070af13311a95e54;p=emacs.git (Fgnutls_peer_status): Return the DH prime bits for the connection --- 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; }