mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2025-01-09 17:33:47 +00:00
start changes
This commit is contained in:
parent
714bed51f8
commit
279a9ef2a2
2 changed files with 7 additions and 4 deletions
|
@ -43,9 +43,12 @@ def _generate_csr(private_key: rsa.RSAPrivateKey) -> str:
|
|||
return csr.public_bytes(serialization.Encoding.PEM).decode("utf-8")
|
||||
|
||||
|
||||
# Generates an APNs push certificate by talking to Albert
|
||||
# Returns [private key PEM, certificate PEM]
|
||||
def generate_push_cert() -> tuple[str, str]:
|
||||
"""
|
||||
Generates an APNs push certificate by talking to Albert.
|
||||
|
||||
Returns [private key PEM, certificate PEM]
|
||||
"""
|
||||
private_key = rsa.generate_private_key(
|
||||
public_exponent=65537, key_size=2048, backend=default_backend()
|
||||
)
|
||||
|
|
|
@ -176,11 +176,11 @@ def pretty_print_payload(
|
|||
)
|
||||
elif id == 0x1D or id == 0x20:
|
||||
print(
|
||||
f"{bcolors.OKGREEN}{prefix}{bcolors.ENDC}: {bcolors.WARNING}PubSub ??{bcolors.ENDC}"
|
||||
f"{bcolors.OKGREEN}{prefix}{bcolors.ENDC}: {bcolors.WARNING}PubSub {id}{bcolors.ENDC}"
|
||||
)
|
||||
elif id == 0xE:
|
||||
print(
|
||||
f"{bcolors.OKGREEN}{prefix}{bcolors.ENDC}: {bcolors.WARNING}Token Confirmation{bcolors.ENDC}"
|
||||
f"{bcolors.OKGREEN}{prefix}{bcolors.ENDC}: {bcolors.WARNING}No Storage{bcolors.ENDC}"
|
||||
)
|
||||
elif id == 0xA:
|
||||
topic = ""
|
||||
|
|
Loading…
Reference in a new issue