def test():
    key = ECKey(**JWK)

    ret_jwe = factory(maliciousJWE)
    jwdec = JWE_EC()
    with pytest.raises(ValueError):
        jwdec.dec_setup(ret_jwe.jwt, key=key.keys())
Пример #2
0
def test_import_export_eckey():
    _key = ECKey(**ECKEY)
    _key.deserialize()
    assert _eq(list(_key.keys()), ["y", "x", "d", "crv", "kty"])