diff options
| author | Lars Magne Ingebrigtsen | 2016-01-03 10:41:51 +0100 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2016-01-03 10:41:51 +0100 |
| commit | 1da116f8ec3f22738961a1997b71db63c2fdac08 (patch) | |
| tree | fcec9c43371bf1accd027d55274dfbf72e52ff88 | |
| parent | e48bacd9d1389e55d0ee1b5f8a55558477646400 (diff) | |
| download | emacs-1da116f8ec3f22738961a1997b71db63c2fdac08.tar.gz emacs-1da116f8ec3f22738961a1997b71db63c2fdac08.zip | |
Add SHA1 warnings for high network security settings
* nsm.el (nsm-check-protocol): When using high security, warn
about SHA1 certificates, which are now believed to be open to
spoofing.
| -rw-r--r-- | lisp/net/nsm.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index 31f2b32792f..dadf0b9d212 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el | |||
| @@ -183,7 +183,9 @@ unencrypted." | |||
| 183 | 183 | ||
| 184 | (defun nsm-check-protocol (process host port status settings) | 184 | (defun nsm-check-protocol (process host port status settings) |
| 185 | (let ((prime-bits (plist-get status :diffie-hellman-prime-bits)) | 185 | (let ((prime-bits (plist-get status :diffie-hellman-prime-bits)) |
| 186 | (encryption (format "%s-%s-%s" | 186 | (signature-algorithm |
| 187 | (plist-get (plist-get status :certificate) :signature-algorithm)) | ||
| 188 | (encryption (format "%s-%s-%s" | ||
| 187 | (plist-get status :key-exchange) | 189 | (plist-get status :key-exchange) |
| 188 | (plist-get status :cipher) | 190 | (plist-get status :cipher) |
| 189 | (plist-get status :mac))) | 191 | (plist-get status :mac))) |
| @@ -209,6 +211,15 @@ unencrypted." | |||
| 209 | host port encryption))) | 211 | host port encryption))) |
| 210 | (delete-process process) | 212 | (delete-process process) |
| 211 | nil) | 213 | nil) |
| 214 | ((and (string-match "\\bSHA1\\b" signature-algorithm) | ||
| 215 | (not (memq :signature-sha1 (plist-get settings :conditions))) | ||
| 216 | (not | ||
| 217 | (nsm-query | ||
| 218 | host port status :signature-sha1 | ||
| 219 | "The certificate used to verify the connectio to %s:%s uses the SHA1 algorithm (%s), which is believed to be unsafe." | ||
| 220 | host port signature-algorithm))) | ||
| 221 | (delete-process process) | ||
| 222 | nil) | ||
| 212 | ((and protocol | 223 | ((and protocol |
| 213 | (string-match "SSL" protocol) | 224 | (string-match "SSL" protocol) |
| 214 | (not (memq :ssl (plist-get settings :conditions))) | 225 | (not (memq :ssl (plist-get settings :conditions))) |