cancel
Showing results for 
Search instead for 
Did you mean: 

Decrypt the contents of a field using certificates

Former Member
0 Kudos

Hi,

My scenario has a xml message coming to XI through http. Now one of the fields in this XML is encrypted and can only be decrypted using certificates. Any help on how this can be done ?

Was also checking SOAP adapter decryption options.. but that is for the whole message and in my case i only need to decrypt a single field

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

agasthuri_doss
Active Contributor
0 Kudos

Hey,

> Now one of the fields in this XML is encrypted and can only be decrypted using certificates.

How you are calling the service to Decrypt your message ?

Cheers

Agasthuri

Former Member
0 Kudos

Hi Agasthuri,

I'm not calling any service to decrypt right now.

agasthuri_doss
Active Contributor
0 Kudos

Bharat,

>Now one of the fields in this XML is encrypted and can only be decrypted using certificates.

You need to call the Encryption / Decryption service to get the decryped message . Though Certificate is installed in the PI server

Cheers

Agasthuri

Former Member
0 Kudos

You mean the decrypt option in the sender agreement for soap adapters right?

Wouldnt this try to decrypt the whole message, in my case i need to decrypt only a single field of this message

agasthuri_doss
Active Contributor
0 Kudos

Bharat,

>Wouldnt this try to decrypt the whole message, in my case i need to decrypt only a single field of this message

This is depend upon the service ( Encryption / Decryption ) in the system.

Cheers

Agasthuri

Former Member
0 Kudos

I guess I have not made my issue clear here.

I'm aware of what is the service i need which is decrypt however my problem now is on how to decrypt IT.

'IT' being a single field in my incoming XML

agasthuri_doss
Active Contributor
0 Kudos

Bharat,

>'IT' being a single field in my incoming XML

The service decides whether it can Decrypt whole file or Filed level , if it is capable - service then for Whole file / Field level there might be different XSD to call the service.

Cheers

Agasthuri

Former Member
0 Kudos

Hi Bharath,

If you want to decrypt the field, You can implement the decryption algorithm inside of a java mapping, and you can only apply to the field you want.

Regards

Ivan

Former Member
0 Kudos

Exactly Jose,

This is what i was trying to do. Hence was looking for pointers on how to go ahead in the java mapping.. since certificates are involved here... any specific jars available that expose decrypt methods using certificates..

Former Member
0 Kudos

Hi,

What You can do, is apply the algorithm which was used to encrypt the message, Inside the certificate you can find that.

I give some links

[http://docs.sun.com/app/docs/doc/820-5704/bhafb?a=view|http://docs.sun.com/app/docs/doc/820-5704/bhafb?a=view]

[http://www.example-code.com/java/encryption.asp|http://www.example-code.com/java/encryption.asp]

[http://www.usenet.com/newsgroups/comp.lang.java.security/msg00270.html|http://www.usenet.com/newsgroups/comp.lang.java.security/msg00270.html]

Regards

Ivan

Former Member
0 Kudos

Hi jose,

Many thanks for the help..

In my case the secure store and forward mechanisms came ot the rescue..

http://help.sap.com/saphelp_nw70/helpdata/EN/4f/65c3b32107964996a56e4165077e24/content.htm