From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jake Newsgroups: gmane.emacs.erc.general,gmane.emacs.bugs Subject: Re: 29.1; ERC 5.5.0.29.1: Unnecessary .authinfo.gpg decryption causes connection failure to irc.libera.chat Date: Sat, 23 Dec 2023 08:00:39 +0000 Message-ID: References: <87zfy1pm2o.fsf@neverwas.me> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000002f22e1060d28bb12" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3906"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bug-gnu-emacs@gnu.org, emacs-erc@gnu.org To: "J.P." Original-X-From: emacs-erc-bounces+sf-erc-help=m.gmane-mx.org@gnu.org Sat Dec 23 09:01:06 2023 Return-path: Envelope-to: sf-erc-help@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rGwwT-0000qM-MT for sf-erc-help@m.gmane-mx.org; Sat, 23 Dec 2023 09:01:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGwwL-00028E-BT; Sat, 23 Dec 2023 03:00:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rGwwJ-000280-QJ; Sat, 23 Dec 2023 03:00:55 -0500 Original-Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rGwwH-0002d2-JZ; Sat, 23 Dec 2023 03:00:55 -0500 Original-Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2ccadec4b79so11193081fa.1; Sat, 23 Dec 2023 00:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703318451; x=1703923251; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=V12QzKgwqgh+feOfBeL7GAnmq6q6f0yyT94Jt2whvbU=; b=ASr0sgGWIpbvfhJbKuEU7JVdIW3sGT6z9XVgDhtlOd47axNb5dJH7o9XDZXCLmmcfI FFIhCHdfNrCMWvxF/Th1eHG6UYtlqRp4XU81GgTxY35xO4xXugQwn1Y86tf5OfgHeYs0 BRjjBmQfSCn4++RcEZqIbzkrsaRylkghQZEFA55kcIQYPHogyJrGl9LPOrEusXaZEV4c PUqdZ/Fs7gAcLeXWOPdGKMHPK19bCYupsCTnMf/cERZdrceZDE5y8gg7W8o63289Reza n5XOzrpAEKCcf5p0GZz4iZXdJ6M76lrj36QagH8VB4vFI+MGk4YGpm1DRYyzEWhxdyv/ EZ1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703318451; x=1703923251; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=V12QzKgwqgh+feOfBeL7GAnmq6q6f0yyT94Jt2whvbU=; b=HZ7Q/mNnPztcMaKoT+1HozJ2dvKXxu+o/Y7LGPu58RT1YaJtKQfDZXK5HGo4B8qDVI 7Lf9jXsprhYRv18uitrJbmAQuSEkmoCrw0yERlPpCrEi6gW5sO831fq4KsKrXcgbjJBr Q12dPhC5uCm/1Y6bVazin78xFUQGzeNyi+aIXpyP3mY89wdjI95xU61XnoayEQOYbkWO F20p6VIRbMs/1I1eLQho2oU+7lS3yhjqN+h3yEKDWuG8EZWNZBRBAp03l/8krwDUJHXQ QnqrZaZ+YakHwEzVc5/rv4i0VeNaqoaXRIiOfUamPqDWvu3NpnfWMNBNNgXoZQZOal7G 961Q== X-Gm-Message-State: AOJu0YzQGEGAHVhDvGC+bbObZJDwEl3W0FPTugc0qRquFwn8757Rchqz AMVsSZd2Wl2eAbyc3Td7NoFEHvLvJXM8/XdBNfrElDWFCXg= X-Google-Smtp-Source: AGHT+IENSB8VF3aqVd5IAhTbYUKMLJL3hhsU1KHcskzAfg9PXlvAL6cepVQ9YhTWV53S3e38E8hkx3LTHVuNcyF6Ofk= X-Received: by 2002:a2e:b6d1:0:b0:2cc:8ccf:1b36 with SMTP id m17-20020a2eb6d1000000b002cc8ccf1b36mr1218346ljo.71.1703318450543; Sat, 23 Dec 2023 00:00:50 -0800 (PST) In-Reply-To: <87zfy1pm2o.fsf@neverwas.me> Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=jforst.mailman@gmail.com; helo=mail-lj1-x232.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, WEIRD_PORT=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-erc@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General discussion about ERC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-erc-bounces+sf-erc-help=m.gmane-mx.org@gnu.org Original-Sender: emacs-erc-bounces+sf-erc-help=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.erc.general:2335 gmane.emacs.bugs:276706 Archived-At: --0000000000002f22e1060d28bb12 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi J.P. Thanks for taking the time. > It just decrypts the file straight > away if it has access to the key it was encrypted with and fails > otherwise. It sounds like you've successfully reproduced it, because it's attempted to decrypt the auth-source file. Now I feel like I'm definitely missing something. Why does it do this? I assume nothing in this file is required to connect to irc.libera.chat, since the connection succeeds if the file is not present. > So, I was wondering if this prompt is coming from somewhere > external, such as a secrets manager or a TTY pinentry program I've had the prompt from gnome keyring on Ubuntu (I assume that's what it is) and gtk-pinentry on another machine. But my issue is that the prompt occurs at all. > Also, is the "irc.libera.chat:6697" buffer completely blank > after the failure? yes it is blank. > And is there anything relevant recorded in the > "*Messages*" buffer? Decrypting /home/jake/.authinfo.gpg...done epa-file-insert-file-contents: Opening input file: Decryption failed, , No secret key Thanks Jake On Sat, Dec 23, 2023 at 4:41=E2=80=AFAM J.P. wrote: > Hi Jake, > > Jake writes: > > > Hello > > > > I encountered an issue with authinfo interfering with ERC: > > When I attempt to connect to the irc.libera.chat server with a random > > nickname and no password, if a ~/.authinfo.gpg file is present on my > > system (or any .gpg file in the auth-sources variable), ERC attempts to > > decrypt this file when connecting. When I don't decrypt it, the > > connection fails. > > > > This occurs with emacs -Q. > > > > If I set auth-sources to nil, or change the name of the .gpg file to > > something else not in auth-sources, I get the expected behavior; i.e., > it connects to the server. > > > > Steps to reproduce: > > 1. have an encrypted ~/.authinfo.gpg file (this will also be an element > of > > the variable auth-sources, which is the default) > > 2. emacs -Q > > 3. M-x erc-tls > > interactively: RET on default values irc.libera.chat and 6697, then > enter a unique nickname and do not > > enter a password > > 4. be prompted to decrypt ~/.authinfo.gpg > > I haven't tried very hard to reproduce this yet, but I can't seem to get > Emacs to prompt me from emacs -Q. It just decrypts the file straight > away if it has access to the key it was encrypted with and fails > otherwise. So, I was wondering if this prompt is coming from somewhere > external, such as a secrets manager or a TTY pinentry program, for > example, > > Please enter the passphrase to unlock the OpenPGP secret key: > "Your Name " > 3071 RSA key, ID DEAD..BEEF > created 2023-12-22 17:30 (main key ID ...). > > Passprhase: ____________________________ > > > > (although, from your description, it seems like you're using graphical > Emacs). Also, is the "irc.libera.chat:6697" buffer completely blank > after the failure? And is there anything relevant recorded in the > "*Messages*" buffer? Perhaps something like: > > For information about GNU Emacs and the GNU system, type C-h C-a. > Decrypting /root/.authinfo.gpg...done > epa-file-insert-file-contents: > Opening input file: Decryption failed, , No secret key > > I'm mainly trying to avoid having to replicate your setup in a VM. > > TIA, > J.P. > --0000000000002f22e1060d28bb12 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi J.P.

Thanks for taking th= e time.

> It just decrypts the file straight > away if it has access to the key it was encrypted with and fails
> otherwise.
It sounds like you've successfully repro= duced it, because it's attempted to decrypt the auth-source file.

Now I feel like I'm definitely missing somethin= g. Why does it do this? I assume nothing in this file is required to connec= t to irc.libera.chat, since the connection succeeds if the file is not pres= ent.

> So, I was wondering if this prompt is co= ming from somewhere
> external, such as a secrets manager or a TTY pinentry program
I've had the prompt from gnome keyring on Ubuntu (I assume that's= what it is) and gtk-pinentry on another machine. But my issue is that the = prompt occurs at all.

> Also, is the "= irc.libera.chat:6697" buffer completely blank
> after the failure?
yes it is blank.

> And is there anything relevant recorded in the
> "*Messages*" buffer?
Decrypting /home/jake/.authin= fo.gpg...done
epa-file-insert-file-contents: Opening input file: Decrypt= ion failed, , No secret key

Thanks
Jake<= br>

On Sat, Dec 23, 2023 at 4:41=E2=80=AFAM J.P. <jp@neverwas.me> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">Hi Jake,

Jake <jfor= st.mailman@gmail.com> writes:

> Hello
>
> I encountered an issue with authinfo interfering with ERC:
> When I attempt to connect to the irc.libera.chat server with a random<= br> > nickname and no password, if a ~/.authinfo.gpg file is present on my > system (or any .gpg file in the auth-sources variable), ERC attempts t= o
> decrypt this file when connecting. When I don't decrypt it, the > connection fails.
>
> This occurs with emacs -Q.
>
> If I set auth-sources to nil, or change the name of the .gpg file to > something else not in auth-sources, I get the expected behavior; i.e.,= it connects to the server.
>
> Steps to reproduce:
> 1. have an encrypted ~/.authinfo.gpg file (this will also be an elemen= t of
> the variable auth-sources, which is the default)
> 2. emacs -Q
> 3. M-x erc-tls
> interactively: RET on default values irc.libera.chat and 6697, then en= ter a unique nickname and do not
> enter a password
> 4. be prompted to decrypt ~/.authinfo.gpg

I haven't tried very hard to reproduce this yet, but I can't seem t= o get
Emacs to prompt me from emacs -Q. It just decrypts the file straight
away if it has access to the key it was encrypted with and fails
otherwise. So, I was wondering if this prompt is coming from somewhere
external, such as a secrets manager or a TTY pinentry program, for
example,

=C2=A0 Please enter the passphrase to unlock the OpenPGP secret key:
=C2=A0 "Your Name <you@example.com>"
=C2=A0 3071 RSA key, ID DEAD..BEEF
=C2=A0 created 2023-12-22 17:30 (main key ID ...).

=C2=A0 Passprhase: ____________________________

=C2=A0 <OK> <Cancel>

(although, from your description, it seems like you're using graphical<= br> Emacs). Also, is the "irc.libera.chat:6697" buffer completely bla= nk
after the failure? And is there anything relevant recorded in the
"*Messages*" buffer? Perhaps something like:

=C2=A0 For information about GNU Emacs and the GNU system, type C-h C-a. =C2=A0 Decrypting /root/.authinfo.gpg...done
=C2=A0 epa-file-insert-file-contents:
=C2=A0 Opening input file: Decryption failed, , No secret key

I'm mainly trying to avoid having to replicate your setup in a VM.

TIA,
J.P.
--0000000000002f22e1060d28bb12--