1

Closed

Invalid option "--display-charset"

description

Hi there

When I try to decrypt a file using a passphrase, the log gives me this message:
[Error] - GpgApi.GpgDecrypt - gpg: Invalid option "--display-charset"
I'm not sure what version of gpg.exe I'm using and I don't know what the minimum version supported by GpgApi is, but this is my source code:
            GpgInterface.ExePath = Path.Combine(Directory.GetCurrentDirectory(), "gpg.exe");
            GpgInterface.HomeDir = Directory.GetCurrentDirectory();
            
            var decrypt = new GpgDecrypt("test1.xml.enc", "decrypted-test1.xml");
            decrypt.AskPassphrase = info => GpgInterface.GetSecureStringFromString("testpassphrase");
            
            decrypt.LogWriter = Console.Out;
            
            var result = decrypt.Execute();

            Console.WriteLine(result.Status.ToString());
            Console.ReadKey(true);
Do you have any idea what could be the problem?

Thanks
Closed Mar 25, 2013 at 7:50 PM by jimmygilles
Will not fix because GpgApi does not support old versions of Gpg.

comments

jimmygilles wrote Mar 14, 2013 at 7:59 PM

Hello,

Can you please check the version of gpg you are using ?
"gpg.exe --version"

I'm using gpg 1.4.13.

Thanks.

For more information on "display-charset" see http://www.gnupg.org/documentation/manuals/gnupg-devel/GPG-Configuration-Options.html

johnknoop wrote Mar 25, 2013 at 2:09 PM

Hi again and sorry for the delay

It seems we are using version 1.0.6 of gpg.exe.

However, since I posted the issue we went on to simply run gpg.exe in a new process since our interaction with that program is so minimal, we felt we don't even need an API around it.

Thanks for answering me though.

wrote Mar 25, 2013 at 7:47 PM

wrote Mar 25, 2013 at 7:48 PM

wrote Mar 25, 2013 at 7:48 PM

wrote Mar 25, 2013 at 7:49 PM

wrote Mar 25, 2013 at 7:50 PM

wrote May 16, 2013 at 6:34 AM