mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1214597 - Ensure that we check the actual result of calling crypto.subtle.verify() in tests r=mt
This commit is contained in:
parent
40a1e7a42d
commit
49300702a2
@ -373,7 +373,7 @@ TestArray.addTest(
|
||||
.then(setPub)
|
||||
]).then(doDerive)
|
||||
.then(doSignAndVerify)
|
||||
.then(complete(that), error(that));
|
||||
.then(complete(that, x => x), error(that));
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -55,7 +55,7 @@ TestArray.addTest(
|
||||
"ECDSA JWK import and verify a known-good signature",
|
||||
function() {
|
||||
var that = this;
|
||||
var alg = { name: "ECDSA", namedCurve: "P-256", hash: "SHA-256" };
|
||||
var alg = { name: "ECDSA", namedCurve: "P-521", hash: "SHA-512" };
|
||||
|
||||
function doVerify(x) {
|
||||
return crypto.subtle.verify(alg, x, tv.ecdsa_verify.sig, tv.ecdsa_verify.data);
|
||||
@ -63,7 +63,7 @@ TestArray.addTest(
|
||||
|
||||
crypto.subtle.importKey("jwk", tv.ecdsa_verify.pub_jwk, alg, true, ["verify"])
|
||||
.then(doVerify)
|
||||
.then(complete(that), error(that))
|
||||
.then(complete(that, x => x), error(that))
|
||||
}
|
||||
);
|
||||
|
||||
@ -82,7 +82,7 @@ TestArray.addTest(
|
||||
.then(spki => crypto.subtle.importKey("spki", spki, alg, false, ["verify"]))
|
||||
]))
|
||||
.then(sigAndKey => crypto.subtle.verify(alg, sigAndKey[1], sigAndKey[0], msg))
|
||||
.then(complete(that), error(that))
|
||||
.then(complete(that, x => x), error(that))
|
||||
}
|
||||
);
|
||||
|
||||
@ -124,7 +124,7 @@ TestArray.addTest(
|
||||
crypto.subtle.generateKey(alg, true, ["sign", "verify"])
|
||||
.then(doSign)
|
||||
.then(doVerify)
|
||||
.then(complete(that), error(that))
|
||||
.then(complete(that, x => x), error(that))
|
||||
}
|
||||
);
|
||||
|
||||
@ -174,7 +174,7 @@ TestArray.addTest(
|
||||
|
||||
crypto.subtle.importKey("raw", tv.ecdsa_verify.raw, alg, true, ["verify"])
|
||||
.then(doVerify)
|
||||
.then(complete(that), error(that))
|
||||
.then(complete(that, x => x), error(that))
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -119,7 +119,7 @@ TestArray.addTest(
|
||||
crypto.subtle.importKey("raw", key, alg, false, ["deriveKey"])
|
||||
.then( doDerive, fail )
|
||||
.then( doSignAndVerify, fail )
|
||||
.then( complete(that), fail );
|
||||
.then( complete(that, x => x), fail );
|
||||
}
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user