On Wed, 16 Mar 2022 09:26, Daniel Kilimnik said:

> mode. With --pinentry-mode loopback --passphrase-fd 0 activated. It asks
> for my current passphrase, but then exits with a success.

--passphrase-fd works only if a password is request but not if two
passwords are quested (the old one and the new one).  You need to use
the --command-fd thingy and write a state machine for this.  Here is a
manual example

--8<---------------cut here---------------start------------->8---
$ gpg --pinentry-mode loopback --status-fd 2 -v --batch --command-fd 0  
--passwd FE894309B6844A3004FE8BF9476CAB1C3623CAA6
[GNUPG:] KEY_CONSIDERED FE894309B6844A3004FE8BF9476CAB1C3623CAA6 0
[GNUPG:] INQUIRE_MAXLEN 100
[GNUPG:] GET_HIDDEN passphrase.enter
abc
[GNUPG:] GOT_IT
[GNUPG:] INQUIRE_MAXLEN 100
[GNUPG:] GET_HIDDEN passphrase.enter
def
[GNUPG:] GOT_IT
[GNUPG:] SUCCESS keyedit.passwd
--8<---------------cut here---------------end--------------->8---


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Gnupg-users mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to