[Gpg4win-users-en] GPG Encryption Fails When Called From Oracle Enterprise Manager
Kent Hurtig
kent_hurtig at friends.edu
Mon Jul 13 20:19:22 CEST 2015
Hi Andre,
I added the --trust-model always option to my encryption command:
gpg -vv --debug-all --batch --trust-model always --default-recipient 21CBF00F --encrypt E:\Test\ECSI_Perkins_Loan_Test\TESTbldpromIG.csv
The output (abbreviated) from the task is below:
E:\Test\ECSI_Perkins_Loan_Test\Scripts>gpg -vv --debug-all --batch --trust-model always --default-recipient
21CBF00F --encrypt E:\Test\ECSI_Perkins_Loan_Test\TESTbldpromIG.csv
gpg: NOTE: no default option file `C:/Windows/system32/config/systemprofile/AppData/Roaming/gnupg/gpg.conf'
gpg: enabled debug flags: packet mpi cipher filter iobuf memory cache memstat trust hashing extprog cardio
assuan
gpg: DBG: fd_cache_open (C:/Windows/system32/config/systemprofile/AppData/Roaming/gnupg/pubring.gpg) not
cached
gpg: DBG: iobuf-1.0: open `C:/Windows/system32/config/systemprofile/AppData/Roaming/gnupg/pubring.gpg'
fd=268
gpg: DBG: iobuf-1.0: underflow: req=8192
gpg: DBG: iobuf-1.0: underflow: got=0 rc=-1
gpg: DBG: C:/Windows/system32/config/systemprofile/AppData/Roaming/gnupg/pubring.gpg: close handle 0000010C
gpg: DBG: fd_cache_close (C:/Windows/system32/config/systemprofile/AppData/Roaming/gnupg/pubring.gpg) new
slot created
gpg: DBG: iobuf-1.0: underflow: eof
gpg: DBG: iobuf-1.0: close `?'
gpg: unknown default recipient "21CBF00F"
gpg: E:\\Test\\ECSI_Perkins_Loan_Test\\TESTbldpromIG.csv: encryption failed: No public key
random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
outmix=0 getlvl1=0/0 getlvl2=0/0
secmem usage: 0/32768 bytes in 0 blocks
I checked and my secret key is located in my secring.gpg which is under my C:\gnupg directory. I ran the following encryption command:
gpg -vv --debug-all --batch --homedir C:\gnupg --default-recipient 21CBF00F --lsign 21CBF00F --encrypt E:\Test\ECSI_Perkins_Loan_Test\TESTbldpromIG.csv
This is the output (abbreviated) from the task:
E:\Test\ECSI_Perkins_Loan_Test\Scripts>gpg -vv --debug-all --batch --homedir C:\gnupg --default-recipient
21CBF00F --lsign 21CBF00F --encrypt E:\Test\ECSI_Perkins_Loan_Test\TESTbldpromIG.csv
gpg: NOTE: no default option file `C://gnupg/gpg.conf'
gpg: enabled debug flags: packet mpi cipher filter iobuf memory cache memstat trust hashing extprog cardio
assuan
usage: gpg [options] --lsign-key user-id
random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
outmix=0 getlvl1=0/0 getlvl2=0/0
secmem usage: 0/32768 bytes in 0 blocks
The task did not encrypt the file.
Any ideas? I don't know why I cannot encrypt the file through our job scheduler, but have no problem encrypting it on the actual server via command line.
Best regards,
Kent
-----Original Message-----
From: Andre Heinecke [mailto:aheinecke at intevation.de]
Sent: Friday, July 10, 2015 4:14 AM
To: Kent Hurtig
Cc: gpg4win-users-en at wald.intevation.org; Roger Scales
Subject: Re: [Gpg4win-users-en] GPG Encryption Fails When Called From Oracle Enterprise Manager
Hi,
On Thursday, July 09, 2015 08:49:56 PM Kent Hurtig wrote:
> Hi Andre,
>
> I created a C:\gnupg directory and copied my pubring.gpg and gpg.conf
> files into it. I added the homedir parameter to my encryption
> command, My encryption command is:
>
> gpg -vv --debug-all --batch --homedir C:\gnupg --default-recipient
> 21CBF00F --encrypt E:\Test\ECSI_Perkins_Loan_Test\TESTbldpromIG.csv
>
> Here is the output from the encryption task:
You should get the same result if you run it without the Batch command.
I think you need to add "--trust-model always" in your command to tell gnupg that it should trust the key even if it is not signed by one of your own keys. As you control the public key in that keyring this should be ok.
Alternatively you can add a secret key to that homedirectory and use
gpg2 --lsign 21CBF00F to mark this key as trusted.
Regards,
Andre
--
Andre Heinecke | ++49-541-335083-262 | http://www.intevation.de/ Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
More information about the Gpg4win-users-en
mailing list