Page MenuHome GnuPG

Importing PGP secret keyring fails on rename
Closed, ResolvedPublic

Description

Release: GnuPG 1.4.1

Environment

Intel Pentium II Celeron, Windows 98 (first edition), GnuPG files stored in C:\Windows\Application Data\gnupg. GnuPG installed to directory D:\Programs\GnuPG.

Description

Starting with files public.pkr and private.skr from PGP version 8, I execute this command:

gpg --import public.pkr

with no problems. When I then afterwards execute this command:

gpg --import private.skr

(note: I have three private keys in private.skr)

GPG tells me the first key has preferences for unavailable algorithms and asks if I want to update the preferences. I say yes and enter my passphrase. It then gives these lines of output:

gpg: renaming C:/WINDOWS/Application Data/gnupg\secring.tmp' to C:/WINDOWS/Application Data/gnupg\secring.gpg' failed: File exists
gpg: WARNING: 2 files with confidential information exists.
gpg: C:/WINDOWS/Application Data/gnupg\secring.gpg is the unchanged one
gpg: C:/WINDOWS/Application Data/gnupg\secring.tmp is the new one
gpg: Please fix this possible security flaw
gpg: error writing keyring `C:/WINDOWS/Application Data/gnupg\secring.gpg': file rename error

It then tells me the same problem exists (unavailable algorithms) on my second key, but never asks whether or not I want to change anything.

If I go and manually rename secring.tmp to secring.gpg, and then rerun the import command on my private keyring, it then successfully imports my third key and asks if I want to update the preferences for the same reason (unavailable algorithms). I say yes and enter my passphrase, and everything works fine (no errors).

How To Repeat

See "Description" (I don't know exactly what needs to be done in PGP8 to produce keyrings which will produce this error, if anything)

Fix

Unknown

Event Timeline

Probably the usual thing. Need to debug it on Windows.

I have tested it with the latest CVS version and can't
replicate it. Please try it again with the next release.

werner removed a project: Restricted Project.