start changes

This commit is contained in:
JJTech0130 2023-08-17 14:53:01 -04:00
parent 714bed51f8
commit 279a9ef2a2
No known key found for this signature in database
GPG key ID: 23C92EBCCF8F93D6
2 changed files with 7 additions and 4 deletions

View file

@ -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()
)

View file

@ -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 = ""