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

Re: Using ftpapi to send encrypting file



Hi Scott
thank you for your answer. Yes I have to send a file in which only a field 
(fiscal code)  is encrypted. The required standard for encryption is the 
following,I translate it from Italian law: "with public key RSA which is in 
a digital certificate X.509 with padding PKCS#1 v 1.5. and the encryption 
must be the same if you use the command : openssl rsautl –encrypt –in 
CF.txt –out CF.enc –inkey MEF.cer –certin –pkcs  where MEF.cer is the 
certificate with the RSA key."  Now to do this I have to create the file on 
system i, download it to pc, run a VB program  that I wrote to do the 
encryption  and then I have to send by FTP the result file. As I would like 
to automate the whole process on system i I'm wondering if it is possible to 
call openssl from rpg program o another way to encrypt the field from rpg 
program, and then by FTPAPI send the file.
best regards
Mario


-----Messaggio originale----- 
From: Scott Klement
Sent: Tuesday, October 18, 2011 5:29 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Using ftpapi to send encrypting file

Hi Mario,

FTPAPI can send an encrypted file -- as long as you send it in BINARY
mode.  You never want to run character set translation (ASCII/EBCDIC) on
encrypted data.

I don't understand the part about encrypting fields with OpenSSL. Do you
really want to encrypt just certain fields, and not the whole file?
I've never tried to do that, and I'm not sure exactly what the pitfalls
and gotchas might be.

On 10/17/2011 12:15 PM, Mario Martoriello wrote:
>
>     Hi all
>     I used the FTPAPI for several project and it's work fine. Now I have
>     to send and encrypting file. The question is the file I have to
>     encrypt by OPENSSL and not all the fields are encrypted . I read some
>     Scott's article in which he explains how to call OPENSSL to encrypt a
>     file but the question is : Is possible to call OPENSSL from a RPG
>     program  to encrypt the necessary fields and then call ftpapi to send
>     the file ?
>     ANY help would be valued .
>
>     Mario
>     best regards
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------