unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Husain Alshehhi <husain@alshehhi.io>, emacs-devel@gnu.org
Subject: Making `package-check-signature' more restrictive by default
Date: Sat, 18 Feb 2023 03:54:22 -0800	[thread overview]
Message-ID: <CADwFkmnuUDa8NiMp1CJ6nGhN9m2jB5WqhqSWYG-0PhFuNsHqPw@mail.gmail.com> (raw)
In-Reply-To: <87a61bkzq9.fsf@localhost>

Ihor Radchenko <yantar92@posteo.net> writes:

> If the default is t, users will be forced to have OpenPGP installed.
> Maybe the default should be like t, but only when OpenPGP is available.

Right.  And if we want to make a change like this, I think we should
make sure to coordinate with the MELPA folks as well.  It would be
unfortunate if the first thing MELPA users did was to turn this off.

Once that is done, perhaps something like this could work?

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index a0bb5e75393..763f0dcadd0 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -345,7 +345,7 @@ package-gnupghome-dir
   :risky t
   :version "26.1")

-(defcustom package-check-signature 'allow-unsigned
+(defcustom package-check-signature (and (epg-find-configuration 'OpenPGP) t)
   "Non-nil means to check package signatures when installing.

 This also applies to the \"archive-contents\" file that lists the



      parent reply	other threads:[~2023-02-18 11:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-15 20:53 Security in the emacs package ecosystem Husain Alshehhi
2023-02-04 13:12 ` Ihor Radchenko
2023-02-04 16:59   ` Stefan Kangas
2023-02-17 10:21     ` Ihor Radchenko
2023-02-17 10:23       ` Ihor Radchenko
2023-02-17 15:54       ` Stefan Kangas
2023-02-18 10:57         ` Ihor Radchenko
2023-02-18 11:49           ` Eli Zaretskii
2023-02-20  5:18             ` Richard Stallman
2023-02-20  6:23               ` Po Lu
2023-02-20 17:38               ` chad
2023-03-11 19:45                 ` Thomas Koch
2023-03-14  4:00                   ` Richard Stallman
2023-02-18 11:54           ` Stefan Kangas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmnuUDa8NiMp1CJ6nGhN9m2jB5WqhqSWYG-0PhFuNsHqPw@mail.gmail.com \
    --to=stefankangas@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=husain@alshehhi.io \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).