Avatar

Level 1

Hi Santosh

I want to disallow the signing, when user tries to use same credential to sign the second signature field

I know how to obtain specific info of the cert used to sign the signature field 1. For example including the following code in signature field 2 preSign event

// Obtain the signature information

var sigInfo = event.target.getField("mySignatureField1").signatureInfo();

// Obtain the certificate:

var cert = sigInfo.certificates[0];

console.println("signer’s common name: " + cert.subjectCN);

console.println("serial number: " + cert.serialNumber);

My doubt is which event should I use to to obtain second signature field certificate information ? 

The preSign event of signature field 2, still doesn't have the info of the certificate used to sign the signatue field2

 

In case I find the rigth event where to get second certificate info, and that both signature fields were signed with the same credential; how should I clear the second signature field ?