Skip to content

Commit

Permalink
Fix cryptography warning in key generation
Browse files Browse the repository at this point in the history
  • Loading branch information
sdb9696 committed Mar 19, 2024
1 parent 1bf3625 commit 5d4685b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion firebase_messaging/fcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def fcm_register(sender_id, token, retries=5, log_debug_verbose=False):
# first byte of public key is skipped for some reason
# maybe it's always zero

private_key = ec.generate_private_key(ec.SECP256R1)
private_key = ec.generate_private_key(ec.SECP256R1())
public_key = private_key.public_key()

serialized_private = private_key.private_bytes(
Expand Down
1 change: 1 addition & 0 deletions firebase_messaging/gcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def gcm_check_in(
)
if resp.status_code == 200:
acir = AndroidCheckinResponse()
break
else:
_logger.warning(
"GCM checkin failed on attempt %s out of %s with status: %s, %s",
Expand Down

0 comments on commit 5d4685b

Please sign in to comment.