cancel
Showing results for 
Search instead for 
Did you mean: 

exception encrypting session key (Java PGP Encryption with Bouncy Castle)

Former Member
0 Kudos

Hello experts,

we want to implement a Java Mapping with PGP encryption using the Bouncy Castle libraries. I can test the Java Mapping locally with Eclipse and everything works fine. I also created other Java Mappings using the same environment and everything works fine.

However, now, the mapping doesn't work on the XI system. I always get the error:

exception encrypting session key

org.bouncycastle.openpgp.PGPException: exception encrypting session key at org.bouncycastle.openpgp.PGPEncryptedDataGenerator.open(Unknown Source) at org.bouncycastle.openpgp.PGPEncryptedDataGenerator.open(Unknown Source) at pgpEncryptionPackage.PGP_Encryption_Test_Neu.encryptFile(PGP_Encryption_Test_Neu.java:127) at pgpEncryptionPackage.PGP_Encryption_Test_Neu.execute(PGP_Encryption_Test_Neu.java:79) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.execute(RepJavaMapping.java:73) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167)

Has anybody an idea, how I can solve this problem?

Best regards,

David

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

There was an underlying exception! The library can't be imported as an "Imported Archive", because it is signed. We imported the file on OS level.

former_member183910
Participant
0 Kudos

Hi David,

Where and how did you deploy those jar files?

Thanks,

Sandeep Maurya

Former Member
0 Kudos

Hi Dandeep,

you have to store the jar-files (e.g. "bcprov-jdk15on-151.jar" and "bcpg-jdk15on-151.jar" ) in th folder "/.../J00/exe/sapjvm_6/jre/lib/ext" and to restart the application server.

best regards,

Norbert

Former Member
0 Kudos

Hope you have downloaded and deployed java class library for bouncy-castle.

Thanks,

Nilehs

Former Member
0 Kudos

Yes, and as the posted error message states, they are also in use. The XI and my local eclipse project use the same bouncycastle libraries. Locally everything works... on XI I get the error.