Why don't you the check completion code from openssl and delete the 'bad'
RPM ?

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mathew
Sent: Monday, November 05, 2007 4:12 PM
To: openssl-users@openssl.org
Subject: Output file is created on incorrect passphrase for decryption

So I'm using openssl to encrypt and decrypt rpms for safe  
distribution. I've create a C program which basically searches the  
file system and decrypts matching encrypted rpms. Problem I'm running  
into is that in the event the user creates a similar matching  
filename, the openssl decryption fails, but still creates the output  
filename. Is there anyway to have it not create the output file on an  
error during decryption.
I'm using this command to decrypt

openssl des3 -d -salt -k <password> -in <input file.rpm> -out <output  
file.rpm>

Is there a safer way of doing this. Its just because after I decrypt  
the encrypted file, I display its meta-tag, and because its not a  
valid RPM since the decryption failed, shows garbage.

Thanks
Mathew

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to