Adobe 22002486 Digital Signature User Guide - Page 88
Acrobat 9 Family of Products, Controlling Signing with Seed Values
View all Adobe 22002486 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 88 highlights
Acrobat 9 Family of Products Security Feature User Guide Controlling Signing with Seed Values Custom Workflows and Beyond 88 field.borderStyle = border.s; field.fillColor = color.ltGray; //a text field to display what seed values set to the sig field var textField = this.addField("aText", "text",0, [110,360,500,550]); textField.borderStyle = border.s; textField.fillColor = color.yellow; textField.multiline = true; textField.display = display.hidden; //hiden form screen and print textField.setAction("MouseUp", "event.target.display = display.hidden;");//click field, field disappears //3. set seed value //3.1 set up issuer's certificate object var myissuerDN = {CN:"Enterprise Services CA", OU:"VeriSign Trust Network", O:"Example Systems Incorporated"}; var mykeyUsage = ["kDigitalSignature","kCRLSign"]; var myMD5Hash = "BF70 913F F8D6 D60A 47FE 8253, 3081 5DB4"; var mySHA1Hash = "6b e8 46 06 39 f5 65 18 48 b2 f8 3a b1 46 3f 56 02 be 06 c3"; var myserialNumber = "3e 1c bd 28"; var mysubjectCN = "Example Root CA"; var mysubjectDN = {CN:"Example Root CA",OU: "Example Trust Services",O: "Example Systems Incorporated",C:"US"}; var myusage = {endUserSigning:true}; var ExampleRootCertBinary = "308204A130820389A00302010202043E1CBD28300D06092A864886F70D01010505003069310 snip>---------440512D9E9B47DB42A57C1FC2A648B0D7BE92694DA4F62957C5781118DC8751CA13B2629D4F2 B32BD31A5C1FA52AB0588C8"; //var myIssuer = {binary:ExampleRootCertBinary,issuerDN:myissuerDN,keyUsage: mykeyUsage,MD5Hash:myMD5Hash, //SHA1Hash:mySHA1Hash,serialNumber:myserialNumber,subjectCN: mysubjectCN,subjectDN:mysubjectDN,usage:myusage}; var myIssuer = security.importFromFile("Certificate", "/c/test/root.cer");//if import from an external reference // 3.2 set up seed value field.signatureSetSeedValue({reasons:myReasons,certspec:{ issuer: [myIssuer],/*oid:oids,*/url:url,flags:certSpecFlag}, flags:svFlag}); //4. Display seed value added to the signature field to the new text field var result = ""; var w = field.signatureGetSeedValue(); for(i in w) result += ( i + " = " + eval("w." +i) + "\n"); var z = w.certspec; for(i in z) result += ( i + " = " + eval("z." +i) + "\n"); textField.value = result + "** Click on me to make me disappear **"; textField.display = display.show; //display what seed values were set }catch (e){ app.alert("setSeedValues(): " + e ); } }