IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

GnuPG decrypt canbt find key from webmethods

  • 1.  GnuPG decrypt canbt find key from webmethods

    Posted 05/27/05 08:03 PM

    I’m using ftp to get a pgp-encrypted file from a partner. I have a webMethods flow that invokes pub.client:ftp and it gets the file. I then use pub.file:getFile to read the contents in, and pub.string:bytesToString to turn the “body” document into a string. I then use the pub.openpgp:decrypt service with that text as input, and it appears to try to run this command:

    gpg --homedir e:\webMethods6\IntegrationServer\gnupg --no-tty --armor --yes --decrypt

    with the string is the “input.” but it gives this error:

    gpg: encrypted with RSA key, ID AF9C9841
    gpg: decryption failed: secret key not available
    gpg: encrypted with RSA key, ID AF9C9841
    gpg: encrypted with RSA key, ID AF9C9841
    gpg: decryption failed: secret key not available

    however, if I run the command from command line with a file as input…

    gpg --homedir e:\webMethods6\IntegrationServer\gnupg --no-tty --armor --yes --decrypt PGPFILE

    where PGPFILE is the file, it decrypts fine. so why doesn’t gpg recognize the secret key when it’s invoked from webMethods openpgp package?


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 04/14/06 04:38 PM

    Hi Luke,

    Are you able to solve this problem. Can you please let me know if you have solved this? I am also getting the same error.

    Thank you in advance,
    Priyatham Porika


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 09/05/07 08:32 PM

    I’m getting the same error and don’t have a clear reason why it’s happening. I can decrypt the file from the command line, but not in webMethods.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 03/27/08 10:38 AM

    Hi,
    Using OpenPGP package, I am able to encrypt file, but I am unable to decrypt file. it throws following error:
    “gpg: Sorry, no terminal at all requested - can’t get input”

    corresponding entry in my openpgp.properties file is:
    pgp.decryptfile= --homedir {0} --no-tty --armor --verbose --yes --decrypt-files {1}

    Appreciate, Let me know if i missed any parameter. I guess it has to do with Passphrase, but i am unable to find it in properties file.

    Thanks,
    Puneet Saxena


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 03/27/08 02:09 PM

    Puneet,
    I think you are right about the passphrase file, try this:

    –batch --homedir yourdirectoryhere --passphrase-file yourdirectoryhere\pgp.txt --armor --yes --decrypt-files file.pgp


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 03/28/08 05:57 AM

    Thanks Markg,

    Infact I tried something else (but Passphrase related) to get it worked. I refered A_Sample_OpenPGP_Implementation_for_Integration_Server[1].pdf (downloaded from advantage) page -5.


    removed the passphrase using gpg --edit -key command, I got decryption worked for me.

    Thanks,
    [FONT=Helvetica][SIZE=2]Puneet Saxena

    [/size][/font]


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 7.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 03/28/08 02:17 PM

    Glad you got it working. If you have an existing corp key that has a passphrase associated with it you can read it in from a file (make sure you lock down access to the file):eek: and it will work with the IS as well.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 8.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 05/07/08 07:42 AM

    My question is what happens if I have two keys configured in IS. I encrypted the file with the second public key, then decrypted the file generated. I was expecting the wM uses the second private key to decrypt the file. But I saw it gave me the info like:

    gpg: encrypted with 1024-bit ELG-E key, ID 5B3C2930, created 2007-06-01
    “key1 (webMethods Server Test Key) <xxx@hotmail.com>”

    wM was using the first key to decrypt the file without the problem (decryptFile sevice).

    Encrypt command line is as follows:(encryptFile service)

    –homedir certs\pgp --no-tty --armor --yes --recipient key2 --encrypt-files h:\webMethods\PGP\newTest\testEncrpt.txt

    what steps did I miss? is there a problem on these two keys setting?

    here is the decrypt setting in OpenPGP
    pgp.decryptfile= --homedir {0} --no-tty --armor --yes --decrypt-files {1}

    Thanks,

    Kathy


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 9.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 12/08/09 02:37 AM

    gpg decrypt error from wm developer

    hi
    i am trying to decrypt the file using gpg , here is the code that i am using from developer
    gpg --passphrase “mypassphrase” -o “/opt/Delta/AE4_PAX/test/catering_20090520.csv” --decrypt “/opt/Delta/AE4_PAX/test/catering_20090520.csv.pgp”

    when i run this on the command shell of linux, it works fine but when i run this from developer it gives me the following error

    usage: gpg [options] [filename]

    any help is appreciated.

    Raj Pamishetty


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 10.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 12/18/09 05:28 PM

    try it without passphrase in wM. It might solve your issue.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 11.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 01/26/10 06:14 PM

    Was this ever solved as I having the exact same problem.
    I’m not using a pass phrase


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 12.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 02/13/13 09:55 AM

    Hey I am facing the same issue…Could you mplease let me know how you solved…I did not find the document which you have mentioned as well


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 13.  RE: GnuPG decrypt canbt find key from webmethods

    Posted 05/07/19 04:10 AM

    –homedir C:\Users\aeadmin_vignesra\AppData\Roaming\gnupg --no-tty --armor --yes --passphrase=danzas2019 --pinentry-mode loopback --decrypt-files C:\PGP\81829.txt.asc

    Please use this command line to avoid the passphrase prompt in windows environment.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods