Subject: Re: bug#36101: 26.1; epg--status-*SIG does not always precent decode

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 04 Sep 2019 15:29:24 +0200

Christophe TROESTLER <[email-masked]> writes:

> If, in the body of `epg-dn-from-string', one changes
>
> 	(condition-case nil
> 	    (if (eq (epg-context-protocol context) 'CMS)
> 		(setq user-id (epg-dn-from-string user-id))
> 	      (setq user-id (epg--decode-percent-escape user-id)))
> 	  (error))
>
> into
>
> 	(condition-case nil
> 	    (if (eq (epg-context-protocol context) 'CMS)
> 		(setq user-id (epg-dn-from-string user-id)))
> 	  (error))
> 	(setq user-id (epg--decode-percent-escape user-id))
>
> it works

Hm.  Reading the code a bit more, I don't think that looks correct?
`epg-dn-from-string' returns an alist, and epg--decode-percent-escape
expects a string.

So I don't understand how that code cold work if
(eq (epg-context-protocol context) 'CMS)...

(defun epg-dn-from-string (string)
  "Parse STRING as LADPv3 Distinguished Names (RFC2253).
The return value is an alist mapping from types to values."

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