;;; nsm.el --- Network Security Manager
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: encryption, security, network
"If non-nil, the connection is opened in a non-interactive context.
This means that no queries should be performed.")
+(declare-function gnutls-peer-status "gnutls.c" (proc))
+
(defun nsm-verify-connection (process host port &optional
save-fingerprint warn-unencrypted)
"Verify the security status of PROCESS that's connected to HOST:PORT.
(nsm-check-protocol process host port status settings)
process)))
+(declare-function gnutls-peer-status-warning-describe "gnutls.c"
+ (status-symbol))
+
(defun nsm-check-certificate (process host port status settings)
(let ((warnings (plist-get status :warnings)))
(cond
(when (> (length cert) 0)
(insert cert "\n"))
(let ((start (point)))
- (insert (apply 'format message args))
+ (insert (apply #'format-message message args))
(goto-char start)
;; Fill the first line of the message, which usually
;; contains lots of explanatory text.
(?s . session)
(?a . always)))
(prefix "")
+ (cursor-in-echo-area t)
response)
(while (not response)
(setq response
(assq (downcase
(read-char
(concat prefix
- "Continue connecting? (No, Session only, Always)")))
+ "Continue connecting? (No, Session only, Always) ")))
responses)))
(unless response
(ding)