File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -473,7 +473,9 @@ def to_jwk(key_obj):
473
473
}
474
474
475
475
if isinstance (key_obj , EllipticCurvePrivateKey ):
476
- obj ["d" ] = to_base64url_uint (key_obj .private_numbers ().private_value ).decode ()
476
+ obj ["d" ] = to_base64url_uint (
477
+ key_obj .private_numbers ().private_value
478
+ ).decode ()
477
479
478
480
return json .dumps (obj )
479
481
Original file line number Diff line number Diff line change 2
2
MG8CAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQEEVTBTAgEBBBiON6kYcPu8ZUDRTu8W
3
3
eXJ2FmX7e9yq0hahNAMyAARHecLjkXWDUJfZ4wiFH61JpmonCYH1GpinVlqw68Sf
4
4
wtDHg2F6SifQEFC6VKj1ZXw=
5
- -----END PRIVATE KEY-----
5
+ -----END PRIVATE KEY-----
Original file line number Diff line number Diff line change @@ -319,11 +319,11 @@ def test_ec_to_jwk_with_valid_curves(self):
319
319
320
320
with open (key_path (f"jwk_ec_pub_{ curve } .json" )) as keyfile :
321
321
pub_key = algo .from_jwk (keyfile .read ())
322
- assert json .loads (algo .to_jwk (pub_key ))[' crv' ] == curve
322
+ assert json .loads (algo .to_jwk (pub_key ))[" crv" ] == curve
323
323
324
324
with open (key_path (f"jwk_ec_key_{ curve } .json" )) as keyfile :
325
325
priv_key = algo .from_jwk (keyfile .read ())
326
- assert json .loads (algo .to_jwk (priv_key ))[' crv' ] == curve
326
+ assert json .loads (algo .to_jwk (priv_key ))[" crv" ] == curve
327
327
328
328
@crypto_required
329
329
def test_ec_to_jwk_with_invalid_curve (self ):
You can’t perform that action at this time.
0 commit comments