aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2014-12-08 22:23:41 +0100
committerLars Magne Ingebrigtsen2014-12-08 22:23:51 +0100
commit7befee11a8f114c43614ad20c3d470e202deb8dc (patch)
tree6587b2284bb3312af9b125adcdd88c52509fb1cd
parentad67503f50b8d2c443e63cb16863b39ad8345567 (diff)
downloademacs-7befee11a8f114c43614ad20c3d470e202deb8dc.tar.gz
emacs-7befee11a8f114c43614ad20c3d470e202deb8dc.zip
* lisp/net/nsm.el (nsm-check-protocol): Test for RC4 on `high'.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/net/nsm.el15
2 files changed, 17 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 62a603b6790..696a42b6b1c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12014-12-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * net/nsm.el (nsm-check-protocol): Test for RC4 on `high'.
4
12014-12-08 Stefan Monnier <monnier@iro.umontreal.ca> 52014-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * progmodes/gud.el (gud-gdb-completions): Remove unused var `start'. 7 * progmodes/gud.el (gud-gdb-completions): Remove unused var `start'.
diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index 659f96922c5..16e07ff088c 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el
@@ -177,7 +177,11 @@ unencrypted."
177 process)))))) 177 process))))))
178 178
179(defun nsm-check-protocol (process host port status settings) 179(defun nsm-check-protocol (process host port status settings)
180 (let ((prime-bits (plist-get status :diffie-hellman-prime-bits))) 180 (let ((prime-bits (plist-get status :diffie-hellman-prime-bits))
181 (encryption (format "%s-%s-%s"
182 (plist-get status :key-exchange)
183 (plist-get status :cipher)
184 (plist-get status :mac))))
181 (cond 185 (cond
182 ((and prime-bits 186 ((and prime-bits
183 (< prime-bits 1024) 187 (< prime-bits 1024)
@@ -186,10 +190,17 @@ unencrypted."
186 (not 190 (not
187 (nsm-query 191 (nsm-query
188 host port status :diffie-hellman-prime-bits 192 host port status :diffie-hellman-prime-bits
189 "The Diffie-Hellman prime bits (%s) used for this connection to\n%s:%s\nis less than what is considerer safe (%s)." 193 "The Diffie-Hellman prime bits (%s) used for this connection to\n%s:%s\nis less than what is considered safe (%s)."
190 prime-bits host port 1024))) 194 prime-bits host port 1024)))
191 (delete-process process) 195 (delete-process process)
192 nil) 196 nil)
197 ((and (string-match "\\bRC4\\b" encryption)
198 (not (memq :rc4 (plist-get settings :conditions)))
199 (not
200 (nsm-query
201 host port status :rc4
202 "The connection to %s:%s uses the RC4 algorithm (%s), which is believed to be unsafe."
203 host port encryption))))
193 (t 204 (t
194 process)))) 205 process))))
195 206