From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gKBNKC4+2GNqGgEAbAwnHQ (envelope-from ) for ; Mon, 30 Jan 2023 23:01:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qMlMKC4+2GPLEQAA9RJhRA (envelope-from ) for ; Mon, 30 Jan 2023 23:01:18 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5A0F0CCA for ; Mon, 30 Jan 2023 23:01:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMcCe-0005TB-I3; Mon, 30 Jan 2023 17:00:40 -0500 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 1pMcCc-0005Sl-H3 for emacs-orgmode@gnu.org; Mon, 30 Jan 2023 17:00:38 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMcCa-0008FZ-Ky for emacs-orgmode@gnu.org; Mon, 30 Jan 2023 17:00:38 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pMcCW-0001x8-Sh for emacs-orgmode@gnu.org; Mon, 30 Jan 2023 23:00:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Karl Voit Subject: Re: org-crypt fails if default key is expired while non-default key is to be used Date: Mon, 30 Jan 2023 23:00:24 +0100 Organization: www.karl-voit.at Message-ID: <2023-01-30T22-59-25@devnull.Karl-Voit.at> References: <2023-01-22T18-32-17@devnull.Karl-Voit.at> <875ycx7dzx.fsf@localhost> <2023-01-23T15-55-10@devnull.Karl-Voit.at> <875ycw70ri.fsf@localhost> <2023-01-29T18-33-58@devnull.Karl-Voit.at> <87pmaw3z94.fsf@localhost> User-Agent: slrn/1.0.3 (Linux) X-GPG-Key: http://www.Karl-Voit.at/Karl_Voit_GnuPG_public_key.gpg X-Registered-Linux-User: 224337 X-Confession: Pastafarian http://www.venganza.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Karl Voit Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675116078; a=rsa-sha256; cv=none; b=KDWPfWE2n0SJldWxwY2dpS2Ra/QPePgIoJNNBpEP1mIOLxCBkNOXcNPMkchk8GibeaXCt8 ERGa9qvHVRbYM4AuShI4WdXVUPI+E1wvR1jlp+FSFNZYNg1AJBvQO2DS9jp57W9wo8jVNe lFK606bJYfvEoOEo5HhANz4tKWYfY4I/W9ReRvqPdA220oG3PJgSktR/QLiC75zDg8RrRK YsK8LrGA5QS0v0wL2enB41Ec/Jh5iNA632el6NwxX7vuokIB7HUPbSoXvmdYzrroTN+/bb s4YSl5rsUhqIQGHVjgevAt7+VV32yodGPoUI5iDPqOAwyK8M3p/hhrVXDCY4OQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675116078; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:references:references:list-id: list-help:list-unsubscribe:list-subscribe:list-post; bh=StbVJ5G7o/uL140hBFmV6ix8nALm9e/LA8THdaWb8/I=; b=aosZ90+fJcarkY634wJlf2Q1v5qcsyhiLmhrZvFMrya1SSyiXvzCzeW+Ssy6I7315COCeM vDvurVY4BonMuC2ZTjf4WyMFenJR5B4A/b0vL8BDRNDqk1EJiHp7oU8/uvLd9ChS7I0l1n izhSb+7Ehmq2Bm/d5+sjJxMepVCSHzrNPtOHCABceov1UJnMz0o1vneWmqGgI2aRFIzHR7 17SseGQpEw2lMlZsHGJZZgaD++YQ2cpHXe4BA1332YvLIPpMrjYr0mQGwCE8uFF9p/4pT3 maxdFihKOk4x6iHKrGFGXYPiBDjPyW0WFmEcAzh183KWjfEFyPKFz1TJI8420Q== Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -1.38 X-Spam-Score: -1.38 X-Migadu-Queue-Id: 5A0F0CCA X-TUID: V5y3MaZaMgrN Hi Ihor, * Ihor Radchenko wrote: > Karl Voit 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) " 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)))) > It asks me for the passphrase of the orgmode key (the correct one) and prints out "test". -- get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode: > get Memacs from https://github.com/novoid/Memacs < Personal Information Management > http://Karl-Voit.at/tags/pim/ Emacs-related > http://Karl-Voit.at/tags/emacs/