Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Subject: Re: authinfo encryption through netrc.el works now
Date: Wed, 04 Aug 2004 19:55:56 +0200	[thread overview]
Message-ID: <ilun01ardn7.fsf@latte.josefsson.org> (raw)
In-Reply-To: <4nacxaaloy.fsf_-_@lifelogs.com>

> +(defun password-read-and-add (prompt &optional key)
> +  "Read password, for use with KEY, from user, or from cache if wanted.
> +Then store the password in the cache.  Uses `password-read' and
> +`password-cache-add'."
> +  (let ((password (password-read prompt key)))
> +    (when (and password key)
> +      (password-cache-add key password))
> +    password))

FWIW:

The point of separating reading the password and caching it, was that
code using password.el would typically look like:

1. Read password.
2. Try to authenticate against server, invoke GPG using the password, etc.
3. If authentication failed, goto 1.
4. Cache the password.

If the password is cached directly, and if the user type the wrong
password, that logic wouldn't work, and it would infloop steps 1, 2,
and 3.

I realize that perhaps a better logic would be:

1. Read and cache password.
2. Try to authenticate against server, invoke GPG using the password, etc.
3. If authentication failed, clear password, and goto 1.

And if the gnus-encrypt/netrc stuff use this logic, then fine, and
ignore this message.




  reply	other threads:[~2004-08-04 17:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-21 18:25 authinfo/netrc file encryption status -- GnuPG Steven E.Harris
2004-07-23 16:22 ` Ted Zlatanov
2004-07-23 17:16   ` Steven E. Harris
2004-07-23 17:00     ` Ted Zlatanov
2004-07-23 21:39   ` Steven E. Harris
2004-07-27 16:56     ` Ted Zlatanov
2004-07-27 18:12       ` Steven E. Harris
2004-07-30 16:52         ` Ted Zlatanov
2004-08-02 23:06           ` Jeremy Maitin-Shepard
2004-08-03 17:09             ` Ted Zlatanov
     [not found]           ` <jk465858idw.fsf@W003275.na.alarismed.com>
     [not found]             ` <4n4qnl8mnw.fsf@lifelogs.com>
     [not found]               ` <jk4ekmp1iym.fsf@W003275.na.alarismed.com>
2004-08-03 17:11                 ` Ted Zlatanov
2004-08-03 21:47                   ` Steven E. Harris
2004-08-04 16:54                     ` authinfo encryption through netrc.el works now (was: authinfo/netrc file encryption status -- GnuPG) Ted Zlatanov
2004-08-04 17:55                       ` Simon Josefsson [this message]
2004-08-05 22:09                         ` authinfo encryption through netrc.el works now Ted Zlatanov
2004-08-06 17:43                           ` Ted Zlatanov
2004-08-06 18:07                             ` Simon Josefsson
2004-08-04 18:37                       ` Steven E. Harris
2004-08-05 22:05                         ` Ted Zlatanov
2004-08-05 22:59                           ` Steven E. Harris
2004-08-06 17:45                             ` Ted Zlatanov
2004-08-06 18:18                               ` Simon Josefsson
2004-08-06 21:57                                 ` Ted Zlatanov
2004-08-04 22:55                   ` authinfo/netrc file encryption status -- GnuPG Steven E. Harris
2004-08-06 17:31                     ` Ted Zlatanov

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=ilun01ardn7.fsf@latte.josefsson.org \
    --to=jas@extundo.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.
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 NNTP newsgroup(s).