| 294 | |
| 295 | @pytest.mark.parametrize("jwe_package", JWE_RSA_PACKAGES) |
| 296 | def test_decrypt_rsa_key_wrap(self, jwe_package): |
| 297 | headers = jwe.get_unverified_header(jwe_package) |
| 298 | if headers["alg"] not in ALGORITHMS.SUPPORTED: |
| 299 | pytest.skip("alg {} not supported".format(headers["alg"])) |
| 300 | if headers["enc"] not in ALGORITHMS.SUPPORTED: |
| 301 | pytest.skip("enc {} not supported".format(headers["enc"])) |
| 302 | key = PRIVATE_KEY_PEM |
| 303 | actual = jwe.decrypt(jwe_package, key) |
| 304 | assert actual == b"Live long and prosper." |
| 305 | |
| 306 | @pytest.mark.parametrize("jwe_package", JWE_128_BIT_OCT_PACKAGES) |
| 307 | def test_decrypt_oct_128_key_wrap(self, jwe_package): |