cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Signature Verification

Former Member
0 Kudos

Hi All,

By calling the Java method in the UDF I am able to generate the XML signature inside a field along with the public key.

Now I need to Verify the signature.

Can somebody help me out on how to read the Public Key from the whole XML and Verify the Signature.

Thanks,

Rupash K

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi

please have a look of the following link

regards,

navneet

Former Member
0 Kudos

Read Public Keys from XML :

http://www.theserverside.com/discussions/thread.tss?thread_id=51679

try {

String privKeybuffer = data.getChildTextTrim("RSASK");

privKeybuffer = privKeybuffer.replaceAll("---BEGIN RSA PRIVATE KEY---", "");

privKeybuffer = privKeybuffer.replaceAll("---END RSA PRIVATE KEY---", "");

privKeybuffer = privKeybuffer.trim();

byte[] priv_llave = new BASE64Decoder().decodeBuffer( privKeybuffer );

PKCS8EncodedKeySpec privSpec = new PKCS8EncodedKeySpec(priv_llave);

PrivateKey prvkey = (PrivateKey) kFactory.generatePrivate(privSpec);

setLlavePrivada( priv_llave );

setPrivateKey( prvkey );

} catch (Exception e) {

System.out.println("Private Key Exception:");

e.printStackTrace();

}

Former Member
0 Kudos

Hi Ganga Prasad,

The Link you have provided is not opening.

Also I am not using Encryption functionality.

Could you please explain your code a bit.

I am not using certifcate from Keystore instead I have the Public key in the file.

I just need to Verify the Signature generated in the mapping.

Thanks,

RK