(self)
| 472 | |
| 473 | @pytest.mark.skipif(AESKey is None, reason="No AES backend") |
| 474 | def test_cty_header_present_when_provided(self): |
| 475 | enc = ALGORITHMS.A256CBC_HS512 |
| 476 | alg = ALGORITHMS.RSA_OAEP_256 |
| 477 | encrypted = jwe.encrypt("Text", PUBLIC_KEY_PEM, enc, alg, cty="expected") |
| 478 | header = json.loads(base64url_decode(encrypted.split(b".")[0])) |
| 479 | assert header["cty"] == "expected" |
| 480 | |
| 481 | @pytest.mark.skipif(AESKey is None, reason="No AES backend") |
| 482 | def test_cty_header_not_present_when_not_provided(self): |
nothing calls this directly
no test coverage detected