unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daiki Ueno <ueno@unixuser.org>
To: Oleksandr Gavenko <gavenkoa@gmail.com>
Cc: 12923@debbugs.gnu.org
Subject: bug#12923: 24.2; epa-file--find-file-not-found-function: Opening input file: Can't decrypt, Exit
Date: Wed, 21 Nov 2012 06:49:46 +0900	[thread overview]
Message-ID: <87lidw54hx.fsf-ueno@unixuser.org> (raw)
In-Reply-To: <878v9w6t69.fsf@gavenkoa.example.com> (Oleksandr Gavenko's message of "Tue, 20 Nov 2012 20:11:26 +0200")

Oleksandr Gavenko <gavenkoa@gmail.com> writes:

> So Emacs break some usual convention used by gpg about .gpg extension...
>
>   $ file /home/user/.gnupg/pubring.gpg
>   /home/user/.gnupg/pubring.gpg: GPG key public ring

Oh, I didn't know that the file command defines such a magic:

# GnuPG
# The format is very similar to pgp
0       string          \001gpg                 GPG key trust database
>4      byte            x                       version %d
# Note: magic.mime had 0x8501 for the next line instead of 0x8502
0       beshort         0x8502                  GPG encrypted data
!:mime  text/PGP # encoding: data

# This magic is not particularly good, as the keyrings don't have true
# magic. Nevertheless, it covers many keyrings.
0       beshort         0x9901                  GPG key public ring
!:mime  application/x-gnupg-keyring

> I expect that Emacs open this file in any case (ever if it doesn't support
> some "standard" .gpg format - open it literary as fall back!).

The rationale of the current behavior (try decryption only) was that a
.gpg file may contain GPG packets which can have any type of GPG data
(encrypted, signed, public keys, ...) in theory.

If the above magic works well for typical use-cases, it might be worth
adding them to Emacs too.

Regards,
-- 
Daiki Ueno





  reply	other threads:[~2012-11-20 21:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-18 13:42 bug#12923: 24.2; epa-file--find-file-not-found-function: Opening input file: Can't decrypt, Exit Oleksandr Gavenko
2012-11-20  7:32 ` Daiki Ueno
2012-11-20 18:11   ` Oleksandr Gavenko
2012-11-20 21:49     ` Daiki Ueno [this message]
2012-11-21  1:12       ` Daiki Ueno
2012-11-21 14:00       ` Stefan Monnier
2021-12-04  4:39         ` Lars Ingebrigtsen

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=87lidw54hx.fsf-ueno@unixuser.org \
    --to=ueno@unixuser.org \
    --cc=12923@debbugs.gnu.org \
    --cc=gavenkoa@gmail.com \
    /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).