[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using webservice and OPENSSL



Hello Scott
thank you for your answer. On my server 5733-sc1 is already installed. I download and installed your utility UNIXCMD. I read the examples and the documentation, if I well understand I may create a pipe to STDIN e STDOUT to pass the input and read the output . Now if the command is like this openssl rsautl -encrypt -in CF.txt -out CF.enc -inkey SanitelCF.cer -certin ?pkcs where cf.txt is input and CF.enc is the output how can I set the pipe to these files correct? I know that openssl has a base64 tool but I'm not sure that if I use the openssl's option "rsautl" the output is in base64, how can I check it?
Thanks in advance
Mario

-----Messaggio originale----- From: Scott Klement
Sent: Thursday, September 04, 2014 7:33 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Using webservice and OPENSSL

If the output is indeed base64, as you say, then it shouldn't be
"strange ASCII characters" that you are sending.

You can install the openssl command-line tool in PASE.  (In fact, IBM
ships it as part of LPO 5733-SC1, which is a no-charge item that is now
sent along with the OS CDs when you get the operating system.)

It's possible to use my UNIXCMD utility to run this command and get the
result back in your RPG program.  Or you can run it with the STRQSH CL
command.  You'll want to make sure that the output is giving you Base64
-- if not, openssl also has a base64 tool that can be used for that.
Once you have it in base64, you should be able to send it with HTTPAPI
(and presumably also WSDL2RPG) without any troubles.

On 9/1/2014 11:08 AM, Mario Martoriello wrote:
    Hi
    I use HTTPAPI and WSDL2RPG (Thomas?s version) to consume some
    webservice and until now I have no problem and everything works fine.
    Now I have to consume a webservice where I have to send some  input
    fields that  must be encrypted as the output of the following command:
    openssl rsautl -encrypt -in CF.txt -out CF.enc -inkey SanitelCF.cer
    -certin ?pkcs
    The encrypt must use BASE64 (RFC1521).
    Did anyone do it before ? Which problem may I find  putting these
    strange ASCII characters in the XML file to send by Httpapi ?  Is
    possible to call OPENSSL from RPG?
    Thanks in advance for your help
    Mario



-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------







-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------