From a28c4469cea474afa372c0a82dc4acec36bef55b Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Tue, 17 Mar 2020 19:58:59 +0100 Subject: [PATCH] chore: fix decryption test titles --- ...ncryption_using_rsa_v15_and_aes-hmac-sha2.test.js | 12 ++++++------ ....including_additional_authentication_data.test.js | 8 ++++---- .../5_11.protecting_specific_header_fields.test.js | 8 ++++---- test/cookbook/5_12.protecting_content_only.test.js | 8 ++++---- .../5_13.encrypting_to_multiple_recipients.test.js | 4 ++-- ...ey_encryption_using_rsa-oaep_with_aes-gcm.test.js | 12 ++++++------ ..._pbes2-aes-keywrap_with-aes-cbc-hmac-sha2.test.js | 12 ++++++------ ...sing_ecdh-es_and_aes-keywrap_with_aes-gcm.test.js | 12 ++++++------ ...ment_using_ecdh-es_with_aes-cbc-hmac-sha2.test.js | 12 ++++++------ .../5_6.direct_encryption_using_aes-gcm.test.js | 12 ++++++------ ...ng_aes-gcm_keywrap_with_aes-cbc-hmac-sha2.test.js | 12 ++++++------ ...8.key_wrap_using_aes-keywrap_with_aes-gcm.test.js | 12 ++++++------ test/cookbook/5_9.compressed_content.test.js | 12 ++++++------ 13 files changed, 68 insertions(+), 68 deletions(-) diff --git a/test/cookbook/5_1.key_encryption_using_rsa_v15_and_aes-hmac-sha2.test.js b/test/cookbook/5_1.key_encryption_using_rsa_v15_and_aes-hmac-sha2.test.js index b8de073e..7fe89bfc 100644 --- a/test/cookbook/5_1.key_encryption_using_rsa_v15_and_aes-hmac-sha2.test.js +++ b/test/cookbook/5_1.key_encryption_using_rsa_v15_and_aes-hmac-sha2.test.js @@ -61,37 +61,37 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - compact verify (failing)`, t => { +test(`${recipe.title} - compact decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - compact verify (using empty keystore)`, t => { +test(`${recipe.title} - compact decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_10.including_additional_authentication_data.test.js b/test/cookbook/5_10.including_additional_authentication_data.test.js index 2373b619..6fc17385 100644 --- a/test/cookbook/5_10.including_additional_authentication_data.test.js +++ b/test/cookbook/5_10.including_additional_authentication_data.test.js @@ -49,25 +49,25 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_11.protecting_specific_header_fields.test.js b/test/cookbook/5_11.protecting_specific_header_fields.test.js index 6cbdee96..5300e197 100644 --- a/test/cookbook/5_11.protecting_specific_header_fields.test.js +++ b/test/cookbook/5_11.protecting_specific_header_fields.test.js @@ -49,25 +49,25 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_12.protecting_content_only.test.js b/test/cookbook/5_12.protecting_content_only.test.js index 4d067d1c..965e63ff 100644 --- a/test/cookbook/5_12.protecting_content_only.test.js +++ b/test/cookbook/5_12.protecting_content_only.test.js @@ -49,25 +49,25 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_13.encrypting_to_multiple_recipients.test.js b/test/cookbook/5_13.encrypting_to_multiple_recipients.test.js index e90f3800..30f93763 100644 --- a/test/cookbook/5_13.encrypting_to_multiple_recipients.test.js +++ b/test/cookbook/5_13.encrypting_to_multiple_recipients.test.js @@ -45,13 +45,13 @@ test(`${recipe.title} - general decrypt - keystore`, t => { t.deepEqual(JWE.decrypt(recipe.output.json, keystore), Buffer.from(plaintext)) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_2.key_encryption_using_rsa-oaep_with_aes-gcm.test.js b/test/cookbook/5_2.key_encryption_using_rsa-oaep_with_aes-gcm.test.js index 7ba5171e..4a5f4096 100644 --- a/test/cookbook/5_2.key_encryption_using_rsa-oaep_with_aes-gcm.test.js +++ b/test/cookbook/5_2.key_encryption_using_rsa-oaep_with_aes-gcm.test.js @@ -61,37 +61,37 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - compact verify (failing)`, t => { +test(`${recipe.title} - compact decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - compact verify (using empty keystore)`, t => { +test(`${recipe.title} - compact decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_3.key_wrap_using_pbes2-aes-keywrap_with-aes-cbc-hmac-sha2.test.js b/test/cookbook/5_3.key_wrap_using_pbes2-aes-keywrap_with-aes-cbc-hmac-sha2.test.js index 3bfa31ee..45639b2c 100644 --- a/test/cookbook/5_3.key_wrap_using_pbes2-aes-keywrap_with-aes-cbc-hmac-sha2.test.js +++ b/test/cookbook/5_3.key_wrap_using_pbes2-aes-keywrap_with-aes-cbc-hmac-sha2.test.js @@ -63,37 +63,37 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - compact verify (failing)`, t => { +test(`${recipe.title} - compact decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - compact verify (using empty keystore)`, t => { +test(`${recipe.title} - compact decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_4.key_agreement_with_key_wrapping_using_ecdh-es_and_aes-keywrap_with_aes-gcm.test.js b/test/cookbook/5_4.key_agreement_with_key_wrapping_using_ecdh-es_and_aes-keywrap_with_aes-gcm.test.js index 6454b944..0d50ca92 100644 --- a/test/cookbook/5_4.key_agreement_with_key_wrapping_using_ecdh-es_and_aes-keywrap_with_aes-gcm.test.js +++ b/test/cookbook/5_4.key_agreement_with_key_wrapping_using_ecdh-es_and_aes-keywrap_with_aes-gcm.test.js @@ -63,37 +63,37 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - compact verify (failing)`, t => { +test(`${recipe.title} - compact decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - compact verify (using empty keystore)`, t => { +test(`${recipe.title} - compact decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_5.key_agreement_using_ecdh-es_with_aes-cbc-hmac-sha2.test.js b/test/cookbook/5_5.key_agreement_using_ecdh-es_with_aes-cbc-hmac-sha2.test.js index f3900f04..2cacbb8b 100644 --- a/test/cookbook/5_5.key_agreement_using_ecdh-es_with_aes-cbc-hmac-sha2.test.js +++ b/test/cookbook/5_5.key_agreement_using_ecdh-es_with_aes-cbc-hmac-sha2.test.js @@ -61,37 +61,37 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - compact verify (failing)`, t => { +test(`${recipe.title} - compact decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - compact verify (using empty keystore)`, t => { +test(`${recipe.title} - compact decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_6.direct_encryption_using_aes-gcm.test.js b/test/cookbook/5_6.direct_encryption_using_aes-gcm.test.js index 96d674f7..16ebda3f 100644 --- a/test/cookbook/5_6.direct_encryption_using_aes-gcm.test.js +++ b/test/cookbook/5_6.direct_encryption_using_aes-gcm.test.js @@ -61,37 +61,37 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - compact verify (failing)`, t => { +test(`${recipe.title} - compact decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - compact verify (using empty keystore)`, t => { +test(`${recipe.title} - compact decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_7.key_wrap_using_aes-gcm_keywrap_with_aes-cbc-hmac-sha2.test.js b/test/cookbook/5_7.key_wrap_using_aes-gcm_keywrap_with_aes-cbc-hmac-sha2.test.js index 03d03180..d7760d33 100644 --- a/test/cookbook/5_7.key_wrap_using_aes-gcm_keywrap_with_aes-cbc-hmac-sha2.test.js +++ b/test/cookbook/5_7.key_wrap_using_aes-gcm_keywrap_with_aes-cbc-hmac-sha2.test.js @@ -61,37 +61,37 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - compact verify (failing)`, t => { +test(`${recipe.title} - compact decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - compact verify (using empty keystore)`, t => { +test(`${recipe.title} - compact decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_8.key_wrap_using_aes-keywrap_with_aes-gcm.test.js b/test/cookbook/5_8.key_wrap_using_aes-keywrap_with_aes-gcm.test.js index e0b36ffd..446bb5ba 100644 --- a/test/cookbook/5_8.key_wrap_using_aes-keywrap_with_aes-gcm.test.js +++ b/test/cookbook/5_8.key_wrap_using_aes-keywrap_with_aes-gcm.test.js @@ -63,37 +63,37 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - compact verify (failing)`, t => { +test(`${recipe.title} - compact decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - compact verify (using empty keystore)`, t => { +test(`${recipe.title} - compact decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) diff --git a/test/cookbook/5_9.compressed_content.test.js b/test/cookbook/5_9.compressed_content.test.js index 6bcaaa57..775f28d2 100644 --- a/test/cookbook/5_9.compressed_content.test.js +++ b/test/cookbook/5_9.compressed_content.test.js @@ -63,37 +63,37 @@ test(`${recipe.title} - general decrypt`, t => { }) }) -test(`${recipe.title} - compact verify (failing)`, t => { +test(`${recipe.title} - compact decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (failing)`, t => { +test(`${recipe.title} - flattened decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (failing)`, t => { +test(`${recipe.title} - general decrypt (failing)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreMatchNone) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - compact verify (using empty keystore)`, t => { +test(`${recipe.title} - compact decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.compact, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - flattened verify (using empty keystore)`, t => { +test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json_flat, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' }) }) -test(`${recipe.title} - general verify (using empty keystore)`, t => { +test(`${recipe.title} - general decrypt (using empty keystore)`, t => { t.throws(() => { JWE.decrypt(recipe.output.json, keystoreEmpty) }, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })