''gpg: failed to translate osfhandle 0x00000003' known|expected? -fd 4-7 doesn't.
omcujl92 at duck.com
omcujl92 at duck.com
Mon Mar 25 13:33:14 CET 2024
> Don't mix Cygwin and plain Windows programs.
cygwin has nothing to do with this thread - there is no element of
cygwin within the quoted code or results.
As said, this is pure GnuPG from
> From https://gnupg.org/download/index.html:
> Windows ...
> download sig Simple installer for the current GnuPG <-- https://gnupg.org/ftp/gcrypt/binary/gnupg-w32-2.4.5_20240307.exe
> C:\Program Files (x86)\GnuPG\bin>type HelloWorld.txt | .\gpg.exe --passphrase-fd 3 -c 3< HelloWorld.txt
> gpg: failed to translate osfhandle 0x00000003
>
> C:\Program Files (x86)\GnuPG\bin>type HelloWorld.txt | .\gpg.exe --passphrase-fd 4 -c 4< HelloWorld.txt
> - brought up a pinentry-qt dialogue. i.e. didn't read from fd 4.
Is there a workaround?
Tried '--pinentry-mode loopback', as well, to no joy.
Using fd 4, '--pinentry-mode loopback' returned:
gpg: error creating passphrase: Invalid passphrase
gpg: symmetric encryption of '[stdin]' failed: Invalid passphrase
On Mon, Mar 25, 2024 at 5:49 AM Werner Koch
<wk_at_gnupg.org_omcujl92 at duck.com> wrote:
>
> On Sat, 23 Mar 2024 21:17, Bee said:
>
> > Is 'gpg: failed to translate osfhandle 0x00000003' known / expected?
>
> Don't mix Cygwin and plain Windows programs.
On Sat, Mar 23, 2024 at 9:17 PM B.S. <bs27975 at gmail.com> wrote:
>
> From https://gnupg.org/download/index.html:
> Windows ...
> download sig Simple installer for the current GnuPG <--
> https://gnupg.org/ftp/gcrypt/binary/gnupg-w32-2.4.5_20240307.exe
>
> -----
>
> C:\Program Files (x86)\GnuPG\bin>ver
>
> Microsoft Windows [Version 10.0.19045.4123]
>
> C:\Program Files (x86)\GnuPG\bin>.\gpg.exe --version
> gpg (GnuPG) 2.4.5
> libgcrypt 1.10.3
> Copyright (C) 2024 g10 Code GmbH
> ...
>
> C:\Program Files (x86)\GnuPG\bin>echo Hello World > HelloWorld.txt
>
> C:\Program Files (x86)\GnuPG\bin>type HelloWorld.txt | .\gpg.exe
> --passphrase-fd 3 -c 3< HelloWorld.txt
>
> gpg: failed to translate osfhandle 0x00000003
>
> -----
>
>
> Is 'gpg: failed to translate osfhandle 0x00000003' known / expected?
>
> Is there a workaround?
> - same result for fd 8 and above. e.g. gpg: failed to translate
> osfhandle 0x0000000b
>
>
> Curiously:
> C:\Program Files (x86)\GnuPG\bin>type HelloWorld.txt | .\gpg.exe
> --passphrase-fd 4 -c 4< HelloWorld.txt
>
> - brought up a pinentry-qt dialogue. i.e. didn't read from fd 4.
> - same for fd 5, 6, and 7.
>
> Is there a workaround?
More information about the Gnupg-users
mailing list