Skip to content

Commit

Permalink
Fix outstanding precommit issues (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjb authored Jan 22, 2024
1 parent 0bc72f4 commit 5b4c882
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion canarytokens/channel_input_mtls.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ def _get_ssl_context(
)

save_certificate(redis_key, cert)
log.debug(f"{cert.get('f') = }")

cert_pem = "{}\n{}".format(
cert.get("c").decode(),
Expand Down
5 changes: 2 additions & 3 deletions canarytokens/wireguard.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,12 @@ def clientConfig(
[Peer]
PublicKey = {getDevices(wg_private_key_seed, wg_private_key_n)[
device_key_idx
]
device_key_idx]
.privateKey.public_key.encode(encoder=nacl.encoding.Base64Encoder)
.decode()}
AllowedIPs = 192.168.1.0/24
Endpoint = {public_ip}:{DEFAULT_PORT}
PersistentKeepalive = {30* (random.randrange(10) + 1)}
PersistentKeepalive = {30 * (random.randrange(10) + 1)}
"""
).strip() # Keep Alive *must* be non-zero to trigger token
return config
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def create_token(token_request: TokenRequest, version: Union[V2, V3]):
)
if resp.status_code >= 400:
log.error(
f"Token creation error: \n\t{token_request = }\n\t{resp.status_code = }; {resp.json() = }"
f"Token creation error: \n\t{token_request=}\n\t{resp.status_code=}; {resp.json()=}"
)
resp.raise_for_status()
data = resp.json()
Expand Down

0 comments on commit 5b4c882

Please sign in to comment.