';
for (var i in c.XSubject) { if (c.XSubject[i]) { x += addHtmlValue(xxCertSubjectNames[i] ? xxCertSubjectNames[i] : i, EscapeHtml(c.XSubject[i])); } }
// x += addHtmlValueNoTitle('Fingerprint', c.fingerprint.substring(0,29) + ' ' + c.fingerprint.substring(30)); // TODO: Parse the certificate using Forge and get the fingerprint
@@ -34137,6 +34172,16 @@ if (typeof module !== "undefined" && module.exports) {
x += "
Organization
";
x += "
State/Province
";
x += "
Country
";
+ x += '
Certificate Usages
';
+ //x += '';
+ //x += '';
+ //x += '';
+ x += '';
+ x += '';
+ x += '';
+ x += '';
+ x += '';
+ x += '
';
setDialogMode(11, "Issue Certificate", 3, issueCertButtonOk, x);
issueCertButtonUpdate();
}
@@ -34202,8 +34247,19 @@ if (typeof module !== "undefined" && module.exports) {
}
}
+ // Figure out the extended key usages
+ var extKeyUsage = { name: 'extKeyUsage' }
+ //if (Q('d11_cu1').checked) { extKeyUsage['2.16.840.1.113741.1.2.1'] = true; extKeyUsage.clientAuth = true; }
+ //if (Q('d11_cu2').checked) { extKeyUsage['2.16.840.1.113741.1.2.2'] = true; extKeyUsage.clientAuth = true; }
+ //if (Q('d11_cu3').checked) { extKeyUsage['2.16.840.1.113741.1.2.3'] = true; extKeyUsage.clientAuth = true; }
+ if (Q('d11_cu4').checked) { extKeyUsage.serverAuth = true; }
+ if (Q('d11_cu5').checked) { extKeyUsage.clientAuth = true; }
+ if (Q('d11_cu6').checked) { extKeyUsage.emailProtection = true; }
+ if (Q('d11_cu7').checked) { extKeyUsage.codeSigning = true; }
+ if (Q('d11_cu8').checked) { extKeyUsage.timeStamping = true; }
+
// Sign the key pair using the CA certifiate
- var cert = amtcert_signWithCaKey(DERKey, xxCaPrivateKey, certattributes, issuerattributes);
+ var cert = amtcert_signWithCaKey(DERKey, xxCaPrivateKey, certattributes, issuerattributes, extKeyUsage);
if (cert == null) { messagebox('Issue Certificate', 'Unable to sign certificate.'); return; }
// Place the resulting signed certificate back into AMT
@@ -34232,20 +34288,24 @@ if (typeof module !== "undefined" && module.exports) {
}
x += "