cassproject 5.0.19 → 5.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -211,9 +211,9 @@ module.exports = class EcFrameworkGraph extends EcDirectedGraph {
|
|
|
211
211
|
if (negative) {
|
|
212
212
|
let msc = this.getMetaStateCompetency(competency);
|
|
213
213
|
for (let assertion of assertions) {
|
|
214
|
-
if (visited.length > 1 && assertion.registration && msc
|
|
214
|
+
if (visited.length > 1 && assertion.registration && msc?.positiveAssertion?.some(a => a.registration == assertion.registration))
|
|
215
215
|
continue;
|
|
216
|
-
if (visited.length > 1 && assertion.registration && msc
|
|
216
|
+
if (visited.length > 1 && assertion.registration && msc?.negativeAssertion?.some(a => a.registration == assertion.registration))
|
|
217
217
|
continue;
|
|
218
218
|
this.addToMetaStateArray(
|
|
219
219
|
msc,
|
|
@@ -251,9 +251,9 @@ module.exports = class EcFrameworkGraph extends EcDirectedGraph {
|
|
|
251
251
|
} else {
|
|
252
252
|
let msc = this.getMetaStateCompetency(competency);
|
|
253
253
|
for (let assertion of assertions) {
|
|
254
|
-
if (visited.length > 1 && assertion.registration && msc
|
|
254
|
+
if (visited.length > 1 && assertion.registration && msc?.positiveAssertion?.some(a => a.registration == assertion.registration))
|
|
255
255
|
continue;
|
|
256
|
-
if (visited.length > 1 && assertion.registration && msc
|
|
256
|
+
if (visited.length > 1 && assertion.registration && msc?.negativeAssertion?.some(a => a.registration == assertion.registration))
|
|
257
257
|
continue;
|
|
258
258
|
this.addToMetaStateArray(
|
|
259
259
|
msc,
|
|
@@ -91,15 +91,16 @@ module.exports = class EcRekeyRequest extends EcRemoteLinkedData {
|
|
|
91
91
|
*/
|
|
92
92
|
async verify() {
|
|
93
93
|
if (!await super.verify()) return false;
|
|
94
|
+
//Compare to true: the browser worker resolves to an {error} object, not false, when a signature is malformed.
|
|
94
95
|
return (await EcRsaOaepAsyncWorker.verifySha256(
|
|
95
96
|
EcPk.fromPem(this.rekeyPk),
|
|
96
97
|
this.toSignableRekeyJson(),
|
|
97
98
|
this.rekeySignature
|
|
98
|
-
) || (await EcRsaOaepAsyncWorker.verify(
|
|
99
|
+
)) === true || (await EcRsaOaepAsyncWorker.verify(
|
|
99
100
|
EcPk.fromPem(this.rekeyPk),
|
|
100
101
|
this.toSignableRekeyJson(),
|
|
101
102
|
this.rekeySignature
|
|
102
|
-
))
|
|
103
|
+
)) === true;
|
|
103
104
|
}
|
|
104
105
|
async addRekeyRequestToForwardingTable() {
|
|
105
106
|
if (!(await this.verify())) return;
|