Require gnutls' when setting gnutls-trustfiles'

This commit is contained in:
Daniel - 2019-12-20 08:45:44 +01:00
parent f5061aa849
commit 4621ed98f0
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64

View File

@ -247,6 +247,7 @@ Will print a warning in case of failure."
Assumes that NEW-VALUE points to a directory, and certificates
are assumed to be of the form *.crt."
(set symbol new-value)
(require 'gnutls)
(when (file-directory-p new-value)
(dolist (cert-file (directory-files new-value t ".crt$"))
(add-to-list 'gnutls-trustfiles cert-file))))