bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16679: 24.3.50; can't create a newly encrypted gpg file with easypg


From: Jason Lewis
Subject: bug#16679: 24.3.50; can't create a newly encrypted gpg file with easypg in cygwin emacs
Date: Fri, 30 Aug 2019 21:44:08 +1000

I’m sorry I don’t use emacs under Cygwin anymore so I can’t test it

Jason

> On 30 Aug 2019, at 8:59 pm, Lars Ingebrigtsen <address@hidden> wrote:
> 
> Jason Lewis <address@hidden> writes:
> 
>> I put a (message "(car lines): %S" (car lines)) right before string is
>> assigned in epg-list-keys, resulting in lots of messages culminating in:
>> 
>> <lots of lines snipped>
>> (car lines): ["uid" "-" nil nil nil "1330660041" nil
>> "02F15375A7024F55715364D1E540EADAA09785E5" nil "ssh\\x3a//gnuradical.su"
>> nil nil nil nil nil]
>> (car lines): ["uid" "-" nil nil nil "1369245874" nil
>> "9C1185A5C5E9FC54612808977EE8F548B2258D31" nil nil nil nil nil nil nil]
>> while: Wrong type argument: stringp, nil
> 
> Are you still seeing this problem in more modern versions of Emacs?
> 
> Looking at the code, it looks like it should be pretty easy to fix -- it
> looks like this key doesn't have a UID name, which is unusual, but could
> be guarded against if it's still a problem with something like the
> below:
> 
> diff --git a/lisp/epg.el b/lisp/epg.el
> index 6d377d07e2..850bbac0db 100644
> --- a/lisp/epg.el
> +++ b/lisp/epg.el
> @@ -1326,7 +1326,8 @@ epg-list-keys
>        ((member (aref (car lines) 0) '("sub" "ssb"))
>         (push (epg--make-sub-key-1 (car lines))
>               (epg-key-sub-key-list (car keys))))
> -       ((equal (aref (car lines) 0) "uid")
> +       ((and (equal (aref (car lines) 0) "uid")
> +             (aref (car lines) 9))
>    ;; Decode the UID name as a backslash escaped UTF-8 string,
>    ;; generated by GnuPG/GpgSM.
>    (setq string (copy-sequence (aref (car lines) 9))
> 
> 
> -- 
> (domestic pets only, the antidote for overdose, milk.)
>   bloggy blog: http://lars.ingebrigtsen.no
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]