gpg doesn't fail on target file existing when decrypting

vedaal at hush.com vedaal at hush.com
Mon Mar 16 17:10:21 CET 2009


Andrew Flerchinger icrf.ml at gmail.com 
wrote on Mon Mar 16 14:10:31 CET 2009 :


> If I pass in --yes, it does indeed overwrite as I'd 
> If I don't, it does NOT overwrite the file. 

> it's just not telling me there was a problem with
> decryption like it does when I'm encrypting something.


there isn't a problem with decrypting,

gnupg asks if you want to overwrite,
and if you answer no (N)
then it asks you where you want the file to be written to

here is what i get when i try it (on windows) without the --yes 
option :


c:\gnupg>gpg --passphrase aaaa1 --output c:\q.txt --decrypt 
c:\q.txt.gpg
:pubkey enc packet: version 3, algo 1, keyid 7DC4274AF9015496
        data: [2047 bits]
gpg: public key is F9015496

You need a passphrase to unlock the secret key for
user: "aaaa1 <aaaa1 at key.test>"
2048-bit RSA key, ID F9015496, created 2005-12-01

gpg: encrypted with 2048-bit RSA key, ID F9015496, created 2005-12-
01
      "aaaa1 <aaaa1 at key.test>"
gpg: TWOFISH encrypted data
:compressed packet: algo=1
:literal data packet:
        mode b (62), created 1236869352, name="q.txt",
        raw data: 3 bytes
gpg: original file name='q.txt'
File `c:\q.txt' exists. Overwrite? (y/N) n
Enter new filename:
Enter new filename: c:\q2.txt
gpg: decryption okay
gpg: session key: 
`10:6EB46AC795C6CCB418116E50DDFDC8CBD3D345761C2759DD5223E8D5D30923DC
'

n.b.
i use the options of 'verbose verbose',
so gnupg gives a lot more information than what you might be used 
to seeing

here it is again without the 'verbose' options:

c:\gnupg>gpg --passphrase aaaa1 --output c:\q.txt --decrypt 
c:\q.txt.gpg

You need a passphrase to unlock the secret key for
user: "aaaa1 <aaaa1 at key.test>"
2048-bit RSA key, ID F9015496, created 2005-12-01

gpg: encrypted with 2048-bit RSA key, ID F9015496, created 2005-12-
01
      "aaaa1 <aaaa1 at key.test>"
File `c:\q.txt' exists. Overwrite? (y/N) y
gpg: session key: 
`10:6EB46AC795C6CCB418116E50DDFDC8CBD3D345761C2759DD5223E8D5D30923DC
'

c:\gnupg>


so,
does gnupg prompt you to 'overwrite' if you don't use the --yes 
option ?


vedaal

any ads or links below this message are added by hushmail without 
my endorsement or awareness of the nature of the link

--
Click to replace your roof - modern technology.
 http://tagline.hushmail.com/fc/BLSrjkqfVeHljhxoDr3jzvpPFptCL3JglXsrLIhZsdQXvB48wr7WwuSpB5W/




More information about the Gnupg-users mailing list