cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP Sender - PGP Encoding issue.

former_member213558
Active Participant
0 Kudos

Dear All.

Scenario is SFTP to SFTP.

I need to decrypt the file and the decrypted file need to process to  Custom module in my sender SFTP Adapter.

sequence is

The problem is, the module which we developed it's working for all the scenario except PGP Decryption case.

Custom module level unable to find the  encode method, so that it's throwing an error in module level.

My Doubt is.

client shared their public key with .asc extension  ( i think .asc encoded with ASCII Armored), and we shared our public key with .pkr extension (not sure what is the encoding format) using the link https://www.igolder.com/PGP/generate-key/.   

1. is because of this am i not able to Decrypt?

2. if yes what i need to do?

3. how can i get .asc file and my server is Linux? i tried it using this link Generating ASCII Armored PGP Key Pairs - Process Integration - SCN Wiki , but it's not a freeware and i'm not sure will it sure if my server is linux.

please note: i'm using 7.4 version single stack.

please help

Regards
Ramesh

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member213558
Active Participant
0 Kudos

Can any one through some light to identify this issue.

is there any way where i can decode my incoming payload.

Regards

Ramesh K

manoj_khavatkopp
Active Contributor
0 Kudos

Ramesh,


Please note: i spited this scenario as,

SFTP Sender (PGP Decryption ) -----> SFTP receiver (parked the same file)

SFTP Sender (same file called where i parked and custom module used) -----> SFTP receiver

but the above case is worked, ...

Really wondering if the modules are executing if mentioned as different scenarios but not executing in the same flow.

So can you try this Module sequence:

PGPDecryption.

MessageLoggerBean.

Custom module.

and run your interface then you will see the entry of decoded message in the Message monitoring check if this is valid payload.

Br,

Manoj

anupam_ghosh2
Active Contributor
0 Kudos

Hi Ramesh,

                      What is the error you are getting.

Regards

Anupam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

former_member213558
Active Participant
0 Kudos

Hi ..

below error i'm getting.

it's pure custom module exception since thy are not able to read the file.

null

[EXCEPTION]

com.sap.aii.af.lib.mp.module.ModuleException: Invalid Corp Code in File :: NAME   Valid Corp Code  CORP


if i open the in notepad++ or in Edit++ i can see the file link below, each chat space contain, so that they can no read the name.



anupam_ghosh2
Active Contributor
0 Kudos

Hi Ramesh,

                  When you are making a two step scenario the issue vanishes because the output from first scenario is saved in disk. While saving the file the invalid characters are converted into space.

Then in second scenario when you use the module , it is able to read those characters since now they are converted into spaces which is valid for the module. To resolve this issue first find out the ascii value of the characters by printing them in module log. Then make appropriate changes in the custom module to handle such characters.

Regards

Anupam

manoj_khavatkopp
Active Contributor
0 Kudos

Ramesh.

  • Is Decryption happening successfully.? For time being remove the MTB and your Custom Module and check if decryption is happening or not.
  • Can you please describe what exactly the custom module is for ?
  • Please share the screenshot of PGPDecryption Module parameter.

Br,

Manoj

former_member213558
Active Participant
0 Kudos

Hi Manoj.

Thanks for reply.

  • Is Decryption happening successfully.? For time being remove the MTB and your Custom Module and check if decryption is happening or not.

          Yes, we tested, it's working.

  • Can you please describe what exactly the custom module is for ?

          converting text to xml format based on the version parameter maintained in Module tab.

  • Please share the screenshot of PGPDecryption Module parameter.

former_member186851
Active Contributor
0 Kudos

Hello Ramesh,

Its based on which key ur using for encryption.

What is the error?

former_member213558
Active Participant
0 Kudos

Hi Ragu .

Thanks for your reply.

Client encrypting with  Encryption Algorithm AES_256 and Signing Algorithm SHA256.

i'm decrypting the file using ownPrivateKey, partnerPublicKey, pwdOwnPrivateKey in localejbs/PGPDecryption module .

can  you please brief  a little  regarding a key in encryption level.

Error throwing in custom module level

null

[EXCEPTION]

com.sap.aii.af.lib.mp.module.ModuleException: Invalid Corp Code in File :: NAME   Valid Corp Code  CORP

please note: this module is working fine without pgp decryption.

Regards

Ramesh

former_member186851
Active Contributor
0 Kudos

Hello Ramesh,

Below link has the PGP procedure.

former_member213558
Active Participant
0 Kudos

HI .

Thanks for your reply.


Yes, i tried using this, but the problem is not encrypt/decrypt , the problem is custom module  not able read  the decrypted file.

Regards

Ramesh

former_member186851
Active Contributor
0 Kudos

Hello Ramesh,

If am not wrong ur decrypting then doing some manipulation with Custom module and ur custom module is working without encryption.

So my assumption here is decryption is not happening correct so its failing.

former_member213558
Active Participant
0 Kudos

Hi.

Decryption is happening... i removed my custom  module and I've got a decrypted file. but this decryped  processing to module is not working.

Please note: i spited this scenario as,

SFTP Sender (PGP Decryption ) -----> SFTP receiver (parked the same file)

SFTP Sender (same file called where i parked and custom module used) -----> SFTP receiver

but the above case is worked, ...

when i call the both sequentially PGP decrytion and my custom module it's throwing an error at module level.

Regards

Ramesh