(self)
| 512 | |
| 513 | @pytest.mark.skipif(AESKey is None, reason="No AES backend") |
| 514 | def test_kid_header_present_when_provided(self): |
| 515 | enc = ALGORITHMS.A256CBC_HS512 |
| 516 | alg = ALGORITHMS.RSA_OAEP_256 |
| 517 | encrypted = jwe.encrypt("Text", PUBLIC_KEY_PEM, enc, alg, kid="expected") |
| 518 | header = json.loads(base64url_decode(encrypted.split(b".")[0])) |
| 519 | assert header["kid"] == "expected" |
| 520 | |
| 521 | @pytest.mark.skipif(AESKey is None, reason="No AES backend") |
| 522 | def test_kid_header_not_present_when_not_provided(self): |
nothing calls this directly
no test coverage detected