all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Андрей Парамонов" <cmr.pent@gmail.com>
Cc: rfrancoise@debian.org, 3829@debbugs.gnu.org
Subject: bug#3829: 23.0.96; Cannot read gpg file
Date: Tue, 04 Aug 2020 21:27:33 +0200	[thread overview]
Message-ID: <87zh7afbyy.fsf@gnus.org> (raw)
In-Reply-To: <87zhjqgasi.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 30 Aug 2019 13:19:57 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Emacs assumes that all files that end with .gpg are encrypted files, and
> will error out dramatically when trying to read those files.  The only
> way the user has to look at them is with `M-x find-file-literally'.
>
> But .gpg is also a common suffix for key ring files.

I had a look at this again, and there doesn't really seem to be a good
set of magic bytes for these files.  "\x01gpg" is used by some, and
"\x99\x01" for others, apparently, and ... a bunch of other two-byte
codes.  But there apparently isn't anything that ensures what the byte
prefixes are in encoded files?  (I'm trying to understand the logic in
"file"...)

On the other hand, we could just let gpg try to decrypt the data and if
we get

gpg -d /tmp/trusted.gpg 
gpg: decrypt_message failed: Unexpected error

then we can just take that as a hint that it's not encrypted data and
then insert the bytes instead.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2020-08-04 19:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-12 12:47 bug#3829: 23.0.96; Cannot read gpg file Андрей Парамонов
2009-07-12 21:44 ` Daiki Ueno
2009-07-13  7:01   ` Андрей Парамонов
2009-07-14  3:06     ` Daiki Ueno
2009-07-14  7:17       ` Glenn Morris
2009-07-14  7:25         ` Processed: " Emacs bug Tracking System
2009-07-14 10:51       ` Андрей Парамонов
2009-07-14 19:59         ` Stefan Monnier
2019-08-30 11:19 ` Lars Ingebrigtsen
2020-08-04 19:27   ` Lars Ingebrigtsen [this message]
2020-08-04 19:43     ` Lars Ingebrigtsen
  -- strict thread matches above, loose matches on Subject: below --
2009-07-12 17:34 Chong Yidong

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

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

  git send-email \
    --in-reply-to=87zh7afbyy.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=3829@debbugs.gnu.org \
    --cc=cmr.pent@gmail.com \
    --cc=rfrancoise@debian.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.