cancel
Showing results for 
Search instead for 
Did you mean: 

PGP Decryption : Error While Decrypting the files

0 Kudos

Hi Experts,

We are facing the following error while decrypting the files using PGP

Error: java.lang.NullPointerException: while trying to invoke the method org.bouncycastle.openpgp.PGPPrivateKey.getKey() of a null object loaded from local variable 'privKey'

we had tried to move the certificates to the other folder and enabled the key root path

we have restarted our Adapter engine

We had validated the certificates and they are the same

Please find the module configuration in the screenshot attached

Can you please help us in debugging the issue?

Thanks in advance for your valuable responses

Many Thanks:

T. Sai Chaithanya

SAP PO/PI

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Is the directory where the Private Key is kept accessible by the SIDADM user? Ask your basis team to check if the SIDADM used has access to this directory and file. It could be a case of file permissions!..

Also if your PI Server has multiple application instances, make sure this is accessible from all application servers..

Regards

Bhavesh

0 Kudos

Hi Bhavesh,

Thanks for your valuable suggestion.

we had checked for the permissions of the user SIDADM, user has the access to the directory and file

Many Thanks:

T. Sai Chaithanya

SAP PO/PI

former_member186851
Active Contributor
0 Kudos

Sai did you upload keys and configure as per the link?

0 Kudos

HI Raghu,

Yes it was setup as per the link provided

On a note it was working earlier, the exception has arrived recently.

Many Thanks:

T. Sai Chaithanya

SAP PO/PI

former_member186851
Active Contributor
0 Kudos

what is the exception Sai?

Answers (3)

Answers (3)

0 Kudos

Hi All,

Issue has been fixed.

we had moved the certificates to new folder and changed the keyrootpath.

Now the channels are polling succesfully.

Thanks all for your valuable suggestions

Many Thanks:

T. Sai Chaithanya

SAP PO/PI

former_member186851
Active Contributor
0 Kudos

Please close the thread Sai .:)

vicky20691
Active Contributor
0 Kudos

Hi Sai Chaithanya,

null object loaded from private key. I could have told exactly the issue if the name of key was not hidden still I will guess it.

1. You need to have 2 keys with you (2 files which are PGP keys).

2. Your private key (ownPrivateKey) to decrypt the file and partnerPublicKey for verifying the signature.

3. Now ownPrivateKey that is the private key you used in module must be with you and partner public key must be given by client.

I hope you have all things till point 3.

Now you have the paramet keyRootPath

4. Both the privateKey (which you have) and public key (which client has given) must be copied/placed at the path mentioned in keyRootPath ( there only the module will search for the key).

If the point 4 is also completed and you are sure about it then, please see have you used the name of the key correctly in module.

5. if the name of privateKey is privKey.asc or privKey.txt or privKey.key or something be sure you give the complete name along with extension in the channel module. The same applies for public key

Regards,

Vikas

former_member186851
Active Contributor
0 Kudos

Hello Sai,

If am not wrong you need upload the keys for encryption and mention the same path in the channel.

0 Kudos

Hi Raghu,

Actually the encryption is done by the clients and PI is decrypting it.

You meant like we need to upload the keys used for encrypting in the keyrootpath?

Many Thanks:

T. Sai Chaithanya

SAP PO/PI

former_member186851
Active Contributor
0 Kudos

yes Sai.

The below link should help you more

former_member186851
Active Contributor
0 Kudos

Did that work after key upload Sai?

apu_das2
Active Contributor
0 Kudos

Hi Sai,

What is the use of AsciiArmored ? Can you remove this and try once.

Did you try putting all certificates in the OS level path - usr/sap/SID/InstanceID/sec/.

If you use keyRoot then this should be accessible through SIDadm user.

Thanks,

Apu