mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-27 15:45:53 -05:00
Added exception guard in authenticode.js
This commit is contained in:
parent
286c34799e
commit
2758af8c11
@ -216,6 +216,7 @@ function createAuthenticodeHandler(path) {
|
|||||||
|
|
||||||
// Get the signing attributes
|
// Get the signing attributes
|
||||||
obj.signingAttribs = [];
|
obj.signingAttribs = [];
|
||||||
|
try {
|
||||||
for (var i in pkcs7.rawCapture.authenticatedAttributes) {
|
for (var i in pkcs7.rawCapture.authenticatedAttributes) {
|
||||||
if (
|
if (
|
||||||
(pkcs7.rawCapture.authenticatedAttributes[i].value != null) &&
|
(pkcs7.rawCapture.authenticatedAttributes[i].value != null) &&
|
||||||
@ -223,8 +224,7 @@ function createAuthenticodeHandler(path) {
|
|||||||
(pkcs7.rawCapture.authenticatedAttributes[i].value[0].value != null) &&
|
(pkcs7.rawCapture.authenticatedAttributes[i].value[0].value != null) &&
|
||||||
(pkcs7.rawCapture.authenticatedAttributes[i].value[1] != null) &&
|
(pkcs7.rawCapture.authenticatedAttributes[i].value[1] != null) &&
|
||||||
(pkcs7.rawCapture.authenticatedAttributes[i].value[1].value != null) &&
|
(pkcs7.rawCapture.authenticatedAttributes[i].value[1].value != null) &&
|
||||||
(forge.asn1.derToOid(pkcs7.rawCapture.authenticatedAttributes[i].value[0].value) == obj.Oids.SPC_SP_OPUS_INFO_OBJID))
|
(forge.asn1.derToOid(pkcs7.rawCapture.authenticatedAttributes[i].value[0].value) == obj.Oids.SPC_SP_OPUS_INFO_OBJID)) {
|
||||||
{
|
|
||||||
for (var j in pkcs7.rawCapture.authenticatedAttributes[i].value[1].value[0].value) {
|
for (var j in pkcs7.rawCapture.authenticatedAttributes[i].value[1].value[0].value) {
|
||||||
if (
|
if (
|
||||||
(pkcs7.rawCapture.authenticatedAttributes[i].value[1].value[0].value[j] != null) &&
|
(pkcs7.rawCapture.authenticatedAttributes[i].value[1].value[0].value[j] != null) &&
|
||||||
@ -242,6 +242,7 @@ function createAuthenticodeHandler(path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (ex) { }
|
||||||
|
|
||||||
// Set the certificate chain
|
// Set the certificate chain
|
||||||
obj.certificates = pkcs7.certificates;
|
obj.certificates = pkcs7.certificates;
|
||||||
|
Loading…
Reference in New Issue
Block a user