emacs-orgmode
[Top][All Lists]
Advanced

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

Re: org-crypt fails if default key is expired while non-default key is t


From: Ihor Radchenko
Subject: Re: org-crypt fails if default key is expired while non-default key is to be used
Date: Mon, 30 Jan 2023 13:53:11 +0000

Karl Voit <devnull@Karl-Voit.at> writes:

>> What is the return value of
>>
>> (epg-list-keys (epg-make-context nil t t) org-crypt-key)
>>
>> ?
>>
>> Does it show the right key?
>
> It shows:
>
> (#s(epg-key ultimate
>             (#s(epg-sub-key ultimate ... nil 1 4096 "ABC12345" 1515327255 nil 
> "AAAAAAAA...ABC12345")
>                #s(epg-sub-key ultimate ... nil 1 4096 "FFFFFFF" 1515327255 
> nil "FFFF.FFFFFFFF"))
>             (#s(epg-user-id ultimate "Karl Voit (Internal key for orgmode) 
> <ABC12345@Karl-Voit.at>" nil))))
>
> ... with ABC12345 being the correct key for org-crypt and FFFFFFF being my
> default OpenPGP key.

Ok. What about

(let ((context (epg-make-context nil t t)))
  (epg-decrypt-string context (epg-encrypt-string context "test" (epg-list-keys 
context org-crypt-key))))

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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