aboutsummaryrefslogtreecommitdiffstats
path: root/src/gnutls.c
diff options
context:
space:
mode:
authorPaul Eggert2019-09-03 12:16:21 -0700
committerRobert Pluim2019-09-04 23:46:31 +0200
commita8432661130ac73ecf7606b1132e9b0d388ab60f (patch)
treecb7c2d296c36d48a5b59a603d1575d8266b3fb4b /src/gnutls.c
parentfc9ed61a4357f766292d157ad89e0c1ffb1fa1e2 (diff)
downloademacs-a8432661130ac73ecf7606b1132e9b0d388ab60f.tar.gz
emacs-a8432661130ac73ecf7606b1132e9b0d388ab60f.zip
Don’t mention :safe-renegotiation in TLS 1.3
* src/gnutls.c (Fgnutls_peer_status): Don’t put the safe-renegotiation indication into the status in TLS 1.3, which removed support for renegotiation.
Diffstat (limited to 'src/gnutls.c')
-rw-r--r--src/gnutls.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gnutls.c b/src/gnutls.c
index 042f43e2912..c74936c840f 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1487,10 +1487,10 @@ returned as the :certificate entry. */)
1487 (gnutls_kx_get (state))))); 1487 (gnutls_kx_get (state)))));
1488 1488
1489 /* Protocol name. */ 1489 /* Protocol name. */
1490 gnutls_protocol_t proto = gnutls_protocol_get_version (state);
1490 result = nconc2 1491 result = nconc2
1491 (result, list2 (intern (":protocol"), 1492 (result, list2 (intern (":protocol"),
1492 build_string (gnutls_protocol_get_name 1493 build_string (gnutls_protocol_get_name (proto))));
1493 (gnutls_protocol_get_version (state)))));
1494 1494
1495 /* Cipher name. */ 1495 /* Cipher name. */
1496 result = nconc2 1496 result = nconc2
@@ -1520,9 +1520,15 @@ returned as the :certificate entry. */)
1520#endif 1520#endif
1521 1521
1522 /* Renegotiation Indication */ 1522 /* Renegotiation Indication */
1523 result = nconc2 1523#ifdef GNUTLS_TLS1_3
1524 (result, list2 (intern (":safe-renegotiation"), 1524 bool older_proto = proto < GNUTLS_TLS1_3;
1525 gnutls_safe_renegotiation_status (state) ? Qt : Qnil)); 1525#else
1526 bool older_proto = true;
1527#endif
1528 if (older_proto)
1529 result = nconc2
1530 (result, list2 (intern (":safe-renegotiation"),
1531 gnutls_safe_renegotiation_status (state) ? Qt : Qnil));
1526 1532
1527 return result; 1533 return result;
1528} 1534}