[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 76c14b7: Make previous auth-source change not break
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 76c14b7: Make previous auth-source change not break on Windows without gnutls |
Date: |
Fri, 20 Sep 2019 16:18:16 -0400 (EDT) |
branch: master
commit 76c14b7191f5c30ceeb06a546b44b3bac03ea8e0
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Make previous auth-source change not break on Windows without gnutls
* lisp/auth-source.el (auth-source--obfuscate)
(auth-source--deobfuscate): Check that gnutls is really available.
---
lisp/auth-source.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index a049e05..e608afc 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -1168,7 +1168,8 @@ FILE is the file from which we obtained this token."
(setq auth-source--session-nonce
(apply #'string (cl-loop repeat 10
collect (random 128)))))
- (if (fboundp 'gnutls-symmetric-encrypt)
+ (if (and (fboundp 'gnutls-symmetric-encrypt)
+ (gnutls-available-p))
(let ((cdata (car (last (gnutls-ciphers)))))
(mapconcat
#'base64-encode-string
@@ -1188,7 +1189,8 @@ FILE is the file from which we obtained this token."
(concat s (make-string (- length (mod (length s) length)) ?\0)))
(defun auth-source--deobfuscate (data)
- (if (fboundp 'gnutls-symmetric-encrypt)
+ (if (and (fboundp 'gnutls-symmetric-encrypt)
+ (gnutls-available-p))
(let ((cdata (car (last (gnutls-ciphers))))
(bits (split-string data "-")))
(substring
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 76c14b7: Make previous auth-source change not break on Windows without gnutls,
Lars Ingebrigtsen <=