cancel
Showing results for 
Search instead for 
Did you mean: 

PGP Encryption using Module in PI 7.1

Former Member
0 Kudos

Hi Experts,

We have devoloped a module for PGP Decryption and deployed as a module in our PI 7.1 server .

We have placed the public and private key certificates(Privatekey.txt,PubKey.txt) and jar files (bcpg-jdk15-1.44.jar,bcprov-ext-jdk14-146.jar,bcprov-jdk14-146.jar ) in the below path of our PI FTP server .

"/usr/sap/<SID>/DVEBMGS03/exe/sapjvm_5/jre/lib/ext"

In Module while reading the private key file it is failing to read and going to else block and throwing "Key is null"

secretkeylocation = moduleContext.getContextData("SecretKeyLocation"); //Reading the path dynamically from channel

try {

iinKey = getClass().getResourceAsStream(secretkeylocation);

if(inKey == null)

{

throw new ModuleException("$$$$ key is null $$$$$");

}

}

NOTE:We have tried placing the pblic and private key certificates in different folder .But faced same issue again.

Above scenario we have devoloped using java mapping .Here it worked successfully

String privateKeyPath = "/com/sap/pgp/secring.skr"; //placed certificates here

inKey = getClass().getResourceAsStream(privateKeyPath); //Reading the file

Could you plz sugest ?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

This was fixed by using bufferreader and converting it to inputstream