Re: Can not import private key (Not enough space)

2024-04-11 Thread Werner Koch via Gnupg-users
On Thu, 11 Apr 2024 12:24, Moses said:
> tried to import again, and the same error still occurred. The same
> error happened when I tried to directly execute the
> D:\software\GNU\GnuPG\bin\gpg --import command.

Well, I have no more idea on how to debug this by mail :-(.

On Linux you would now use strace and on Windows we have the
sysinternals tools to trace the system calls.  And there is printf
debugging - I would here start with libassuan (src/assuan-socket.c).


Salam-Shalom,

   Werner

-- 
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein


openpgp-digital-signature.asc
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Can not import private key (Not enough space)

2024-04-11 Thread Moses via Gnupg-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

I checked my D:\software\GNU\GnuWin32\bin. There is no gpg.exe in it,
only gpg-error.exe and gpg-error-config. But there is gpg.exe in my
git folder. I adjusted the PATH and temporarily removed it. Then I
tried to import again, and the same error still occurred. The same
error happened when I tried to directly execute the
D:\software\GNU\GnuPG\bin\gpg --import command.

- --
M.

On Wed, Apr 10, 2024 at 3:35 PM Werner Koch  wrote:
>
> Hi,
>
> I see in your PATH
>
>   D:\software\GNU\GnuWin32\bin
>
> prior to
>
>   D:\software\GNU\Gpg4win\..\GnuPG\bin
>
> May it be that you use a gpg version picked up from the GnuWin32?  Check
> also whether there is a gpg binary in the Git program directory.
>
> My educated guess is that Gnuwin32 is a Cygwin based collection of
> utilities which might also include gpg.  Cygwin uses a slightly
> different and incompatiple socket emulation which would explain the
> error your get.  As a workaround you may try to run
>
>   D:\software\GNU\GnuPG\bin\gpg --import foo
>
> to use the correct gpg.
>
>
> Shalom-Salam,
>
>Werner
>
>
> --
> The pioneers of a warless world are the youth that
> refuse military service. - A. Einstein
-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEEtS81xZ6ggCm51urXjBWeIrrYv8gFAmYX1lQACgkQjBWeIrrY
v8hC/xAAkRIsAYlONRBS2Rg30AMB4ghMbU3SKlJ6mNpOcXmdv4U547Ie9iV0F6vl
UkPIn1CTThzffMuRvkWkbB+hccZTWC/lzjEUnpub4cQXG/MWZqX/KZY2ujqHwqSz
RTwv9Nirxw01bP+t6R/BIct4ReIePoI7nyD06JhAOMR3iuE7FCFOg8vaYC7ooZHG
4CUbAptK7l04hPxpfJ5drfqNCeTy2Bh/mHmVADFu43lq9AW9vhcpOabo+8jcNtQn
4FYITjq/P16c1cnNL5CZdWHqGK/+7T4VyIFowGL6/HYRiQR+Nokr1XRLI6+aJ2HU
soRaHc0r2UFVie71jgvPfc+R0dekffW/OCir4Eye3o1KmLrCpHjFKKknYca0pOeA
R4IO1U8tSHzRru3w7GTX9A2V4ziAcrdzmFjBrCWjLSaJJc9FLZbKyXLG9F9nAvIQ
6s+mf3/RaR8AURaO9WLE32Cvi3K2i1vhnPkJgMcgWpvH3MZA8rcrEX0+tSSUuMes
3owKpgKVNmpMsKdtgJEd0HV1VRKk2UV5mUf+b1MAv7jxrH5nApBAJdxrrqrK1hXP
X7v5S/GSgK0gv1zl0MAeyJfgeqJKgDP4VZMl2O3z98Z8DW3stzWMqZv/PR+vZYPY
EExISfJxQxLQtMNVIXm8tkGVEg0kmtCQIkNEnMQJLce+nbnw6mQ=
=VoTO
-END PGP SIGNATURE-

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Can not import private key (Not enough space)

2024-04-10 Thread Werner Koch via Gnupg-users
Hi,

I see in your PATH

  D:\software\GNU\GnuWin32\bin

prior to

  D:\software\GNU\Gpg4win\..\GnuPG\bin

May it be that you use a gpg version picked up from the GnuWin32?  Check
also whether there is a gpg binary in the Git program directory.

My educated guess is that Gnuwin32 is a Cygwin based collection of
utilities which might also include gpg.  Cygwin uses a slightly
different and incompatiple socket emulation which would explain the
error your get.  As a workaround you may try to run

  D:\software\GNU\GnuPG\bin\gpg --import foo

to use the correct gpg.


Shalom-Salam,

   Werner


-- 
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein


openpgp-digital-signature.asc
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Can not import private key (Not enough space)

2024-04-09 Thread Moses via Gnupg-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

Thank you for your continued follow-up. I executed commands. Here are
the results:

C:\>gpgconf -V
* GnuPG 2.4.5 (cbff323b3)
MingW32
Windows 10.0 build 19045

* Libgcrypt 1.10.3 (aa161086)
version:1.10.3:10a03:1.48:13000:
cc:10:gcc:10-win32 20210110:
ciphers:arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia:idea:salsa20:gost28147:chacha20:sm4:
pubkeys:dsa:elgamal:rsa:ecc:
digests:crc:gostr3411-94::md4:md5:rmd160:sha1:sha256:sha512:sha3:tiger:whirlpool:stribog:blake2:sm3:
rnd-mod:w32:
cpu-arch:x86:
mpi-asm:i386/mpih-add1.S:i386/mpih-sub1.S:i386/mpih-mul1.S:i386/mpih-mul2.S:i386/mpih-mul3.S:i386/mpih-lshift.S:i386/mpih-rshift.S:
hwflist:intel-cpu:intel-bmi2:intel-ssse3:intel-sse4.1:intel-pclmul:intel-aesni:intel-rdrand:intel-avx:intel-avx2:intel-fast-vpgather:intel-rdtsc:
fips-mode:n:::
rng-type:standard:1:303:1:
compliance:::

* GpgRT 1.48 (77b7c5f)

* Libassuan 2.5.7 (cc2f776)

* KSBA 1.6.6 (3a43822)

* NTBTLS 0.3.2 (2c38007)


C:\>gpgconf -X
### Dump of all standard config files
### GnuPG 2.4.5 (cbff323b3)
### MingW32
### [VERSION file not found]
### Windows 10.0 build 19045
### Libgcrypt 1.10.3
### GpgRT 1.48
### Codepages: 65001 936 936
###

sysconfdir:C%3a\ProgramData\GNU\etc\gnupg
bindir:D%3a\software\GNU\Gpg4win\..\GnuPG\bin
libexecdir:D%3a\software\GNU\Gpg4win\..\GnuPG\bin
libdir:D%3a\software\GNU\Gpg4win\..\GnuPG\lib\gnupg
datadir:D%3a\software\GNU\Gpg4win\..\GnuPG\share\gnupg
localedir:D%3a\software\GNU\Gpg4win\..\GnuPG\share\locale
socketdir:C%3a\Users\███\AppData\Local\gnupg
dirmngr-socket:C%3a\Users\███\AppData\Local\gnupg\S.dirmngr
keyboxd-socket:C%3a\Users\███\AppData\Local\gnupg\S.keyboxd
agent-ssh-socket:C%3a\Users\███\AppData\Local\gnupg\S.gpg-agent.ssh
agent-extra-socket:C%3a\Users\███\AppData\Local\gnupg\S.gpg-agent.extra
agent-browser-socket:C%3a\Users\███\AppData\Local\gnupg\S.gpg-agent.browser
agent-socket:C%3a\Users\███\AppData\Local\gnupg\S.gpg-agent
homedir:C%3a\Users\███\AppData\Roaming\gnupg

PATH=D:\software\VMware\bin\;C:\Program Files\Common
Files\Oracle\Java\javapath;C:\Program
Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Program Files
(x86)\Common Files\Intel\Shared
Libraries\redist\intel64\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program
Files\dotnet\;C:\Program Files\Microsoft SQL
Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client
SDK\ODBC\170\Tools\Binn\;D:\software\GNU\GnuWin32\bin;D:\software\Git\cmd;D:\software\Python\Python39\Scripts;D:\software\Python\Python39\;D:\software\emacs\bin;C:\Program
Files\Azure Data Studio\bin;C:\Program Files\Microsoft SQL
Server\150\Tools\Binn\;C:\Users\███\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\███\App;D:\software\Calibre\;C:\Program
Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files
(x86)\cloudflared\.;D:\software\GNU\Gpg4win\..\GnuPG\bin;C:\Program
Files\WireGuard\;C:\Users\███\AppData\Local\Programs\Python\Python310\;C:\Users\███\AppData\Local\Microsoft\WindowsApps;C:\Users\███\.dotnet\tools;C:\Program
Files\Azure Data
Studio\bin;D:\software\Google\CloudSDK\google-cloud-sdk\bin

###
### global config "C:\ProgramData\GNU\etc\gnupg\common.conf": not installed
###
###
### local config "C:\Users\███\AppData\Roaming\gnupg\common.conf": not installed
###

###
### global config "C:\ProgramData\GNU\etc\gnupg\gpg-agent.conf": not installed
###
###
### local config "C:\Users\███\AppData\Roaming\gnupg\gpg-agent.conf"
###
- --8<---cut here---start->8---

###+++--- GPGConf ---+++###
verbose
verbose
debug-level guru
###log-file C:\Users\███\AppData\Roaming\gnupg\gpg-agent.log
###+++--- GPGConf ---+++### 03/08/24 12:14:59 Coordinated Universal Time
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
- --8<---cut here---end--->8---

###
### global config "C:\ProgramData\GNU\etc\gnupg\scdaemon.conf": not installed
###
###
### local config "C:\Users\███\AppData\Roaming\gnupg\scdaemon.conf"
###
- --8<---cut here---start->8---

###+++--- GPGConf ---+++###
verbose
verbose
verbose
verbose
verbose
###+++--- GPGConf ---+++### 03/08/24 10:46:59 Coordinated Universal Time
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
- --8<---cut here---end--->8---

###
### global config "C:\ProgramData\GNU\etc\gnupg\dirmngr.conf": not installed
###
###
### local config "C:\Users\███\AppData\Roaming\gnupg\dirmngr.conf"
###
- --8<---cut here---start->8---

###+++--- GPGConf ---+++###
#allow-version-check
allow-version-check
honor-http-proxy
keyserver hkps://keys.openpgp.org

Re: Can not import private key (Not enough space)

2024-04-09 Thread Werner Koch via Gnupg-users
Hi!

On Tue,  9 Apr 2024 12:21, Moses said:
> C:\>gpgconf -L

which merely shows that you installed the software on d:\software and
kep the user data at the usual C: directories.  I see nothing strange.

To recap your problem was:

c:\> gpg --import private-keys.asc
gpg: enabled compatibility flags:
[snipped]
gpg: key xxx: error sending to agent: Not enough space

I don't known why you get that error which might hint at a out of memory
(not out of disk space) problem.We could look at the output of

  gpgconf -V

and

  gpgconf -X

but I doubt that this will show anything useful for your case.  Can you
start kleopatra?  If so, what does its selftest tell?

What you can do is:

  gpgconf -K all

to stop all background processes (or use the taskmgr or logout and in
again).

  cd %APPDATA%
  ren gnupg gnupg.save
  cd %LOCALAPPDATA%
  ren gnupg gnupg.save

and then try agin.  If this does work you might have insufficent
permissions somewhere below %APPDATA%\gnupg .  If kleopatra starts you
can also teh DbgViewer tool from Sysinternals to see the diagnostics
from Kleopatra.


Shalom-Salam,

   Werner

-- 
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein


openpgp-digital-signature.asc
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Can not import private key (Not enough space)

2024-04-09 Thread Moses via Gnupg-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Returns as follows:
(just blacked out the username...)

C:\>gpgconf -L
sysconfdir:C%3a\ProgramData\GNU\etc\gnupg
bindir:D%3a\software\GNU\Gpg4win\..\GnuPG\bin
libexecdir:D%3a\software\GNU\Gpg4win\..\GnuPG\bin
libdir:D%3a\software\GNU\Gpg4win\..\GnuPG\lib\gnupg
datadir:D%3a\software\GNU\Gpg4win\..\GnuPG\share\gnupg
localedir:D%3a\software\GNU\Gpg4win\..\GnuPG\share\locale
socketdir:C%3a\Users\■\AppData\Local\gnupg
dirmngr-socket:C%3a\Users\■\AppData\Local\gnupg\S.dirmngr
keyboxd-socket:C%3a\Users\■\AppData\Local\gnupg\S.keyboxd
agent-ssh-socket:C%3a\Users\■\AppData\Local\gnupg\S.gpg-agent.ssh
agent-extra-socket:C%3a\Users\■\AppData\Local\gnupg\S.gpg-agent.extra
agent-browser-socket:C%3a\Users\■\AppData\Local\gnupg\S.gpg-agent.browser
agent-socket:C%3a\Users\■\AppData\Local\gnupg\S.gpg-agent
homedir:C%3a\Users\■\AppData\Roaming\gnupg




On Tue, Apr 9, 2024 at 10:05 AM Werner Koch  wrote:
>
> On Mon,  8 Apr 2024 11:42, Moses said:
>
> > C:\> gpg-connect-agent -v
> >> getinfo version
> > D 2.4.5
>
> Okay, that works.
>
> >> gpgconf -L
> > ERR 67109139 Unknown IPC command 
>
> Please enter this on the command line not at the gpg-connect-agent
> prompt.
>
>
> Salam-Shalom,
>
>Werner
>
> --
> The pioneers of a warless world are the youth that
> refuse military service. - A. Einstein
-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEEtS81xZ6ggCm51urXjBWeIrrYv8gFAmYVMnsACgkQjBWeIrrY
v8hGFRAAq2Y7Rzahrz3nBKoLkO29rzKMpurp0XXhOk0ONPXcJGKCLDq6UvDa1VmH
yowbbY87lOSucAKjyekrr1qr0as7p76/rRQPQeorXjQF/GeEFTUEzolRWJk70M3C
+Wcxi9WbNV/VmZsnJUjpsG4FKyqgBqhKdildPm1CvTF4mmF+X5cOK1swi3GoWf3I
LGF9zJ+Gbm5Shs65htJ9xCSryCYEHciZHev5zMt6yQM1ZBBjKbkOC2OLRoFSBCej
CDHcmY4tA6a//De4jUyv3ypoxBv4bPOLOgvDzRVne62hhOwAQqtFF8ZgX+McS4cs
Zw+xJycPZVDegFvlQW2qwhtJWYfUXCGpxlrsi/1zoOgHp1uaR8O/8x8gszBuiXKj
kuLIojRZWRnt1lYItO3oUO6t/z95HfNUE1aT4hKcGuDx/yK4/1h4i9VFb48W0qAu
WoWuiON8Q36SsLA2C6cuPfpjx5gusX31iiuMoNH5IoujN6Ip4al9v0Goo76CSe7l
Sqy4iLmAh3DhTt2prw70k93GAMD3oORT/AGk1SyxDoRzRmV99BELdr4ZGFyJnhqW
wvBjxtl0ynRg7UOKilug+tZbTRSlAqNMeBAKLn90aSsmy8f/MZuPvyDnhowpoL/a
7jpZaLlTvKvzi++Yd5MHvyX97rOrzIndsVyC1Qr1yN+EuQa1ubI=
=3+BK
-END PGP SIGNATURE-

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Can not import private key (Not enough space)

2024-04-09 Thread Werner Koch via Gnupg-users
On Mon,  8 Apr 2024 11:42, Moses said:

> C:\> gpg-connect-agent -v
>> getinfo version
> D 2.4.5

Okay, that works.

>> gpgconf -L
> ERR 67109139 Unknown IPC command 

Please enter this on the command line not at the gpg-connect-agent
prompt.


Salam-Shalom,

   Werner

-- 
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein


openpgp-digital-signature.asc
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Can not import private key (Not enough space)

2024-04-08 Thread Moses via Gnupg-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

I tried the command you gave and the results are as follows:

C:\> gpg-connect-agent -v
> getinfo version
D 2.4.5
OK
> gpgconf -L
ERR 67109139 Unknown IPC command 

I downloaded and installed gpg4win from the official website, and the
signature/sha-256 of the installer matches.

Thanks

- --
M.






-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEEtS81xZ6ggCm51urXjBWeIrrYv8gFAmYT14wACgkQjBWeIrrY
v8g/DRAAlgbnQ8wLj9vnJXfEpf9yh+uXRs0A6r6DV0/44ni/AzyqcRzCDKhbHXOO
dSdsA2RKmv+7QB9p3X1c/d09YmAF1qzgiA7zT2EQXKmPoMCJRLWTfeY3wlCqeldd
OCsXIZzE9rQifMn8YjvPe8A//Fc6Y+EomQpYP8qVBWISwpQ7eOdq6uLyLT/nid0O
66CjTdGyRwyni+PKKHNjDjvkJAKm+m5AGK3OEvxSnYWq0qgLNW6xizhZmzShU5lR
Jvbsz66H6VZM+I0kLLB63bdqwDJPy6KcfpOeT62K1U+pQ++mcLI3GpYw76mrnHL2
odTrZ5/yADX+zcKyqEiXLVGjZQMm/PrmNvKoZ0hC6svA3lfryOhgqdVmh6TME5x9
mLnDwawqacxy6Y2YJxUHnMbIPyAI+0L2Kd7GGoGHvjjWBqYsU//5DN3dmPw5W9+C
OfSyzYWgV3fBW29+rcW/mSZS4uZZuArFsYqbqU/mpTiG9rSeeVkEymcSjSH6PEdy
AUQQN4xQDhqQNY7IXLKzD6fh6/felEl5qU2PehKMMIjX5z6AQCldAwhbxVLbGOXj
DGnsXIqvoXMLt3LhJIers1aDnaWhs6ebC4dWcx3N+Pfsbo6rQEkTcgHDKHCo4dxd
fkBQs3xEahy2JMWNtxi34gcPcdVC2AbUnzO6erpM7hN8f5udSQM=
=soqR
-END PGP SIGNATURE-
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Can not import private key (Not enough space)

2024-04-08 Thread Werner Koch via Gnupg-users
Hi!

On Mon,  8 Apr 2024 02:38, Moses said:

> gpg: key xxx: error sending to agent: Not enough space

That is a ENOMEM which is commonly returned for a failed malloc call.
Could happen at a lot of places.

Try:

  gpg-connect-agent -v

and tehre a command like "getinfo version" to check whether tehre is a
problem with the IPC connection.

  gpgconf -L

also gives important information.

> c:\> gpg --version
> gpg (GnuPG) 2.2.15

That version is pretty old and in terms of IPC ("error sending to
agent") one idfference is that this version uses %APPDATA%\gnupg for the
socket files but modern versions use %LOCALAPPDATA%\gnupg.



Shalom-Salam,

   Werner

-- 
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein


openpgp-digital-signature.asc
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


Can not import private key (Not enough space)

2024-04-07 Thread Moses via Gnupg-users
Hi,

I've encountered an issue while trying to import a private key into GnuPG,
resulting in an unexpected error message. Below are the details including
the version of GnuPG and the error messages received:

c:\> gpg --version
gpg (GnuPG) 2.4.5
libgcrypt 1.10.3
...


c:\> gpg --import private-keys.asc
gpg: enabled compatibility flags:
[snipped]
gpg: key xxx: error sending to agent: Not enough space
gpg: error reading 'private-keys.asc': Not enough space
gpg: import from 'private-keys.asc' failed: Not enough space
gpg: Total number processed: 0
gpg: unchanged: 1
gpg: secret keys read: 1


Interestingly, my disk has ample space available, so this error seems to be
misleading. Furthermore, when attempting to import the same file on an
older GnuPG installation, the import is successful:

c:\> gpg --version
gpg (GnuPG) 2.2.15
libgcrypt 1.8.4
...


c:\> gpg --import private-keys.asc
[snipped]
gpg: Total number processed: 2
gpg: unchanged: 2
gpg: secret keys read: 2
gpg: secret keys unchanged: 2


Could you please provide any advice on this matter?

Thank you in advance for your assistance.

Best regards,

--
M.
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users