Encryption fix

This commit is contained in:
Kumi 2023-01-09 18:03:43 +00:00
parent 4cedbfd5fc
commit 1da071506a
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -17,7 +17,7 @@ if __name__ == "__main__":
if newfile.is_file() and (time.time() - newfile.stat().st_mtime > 60): if newfile.is_file() and (time.time() - newfile.stat().st_mtime > 60):
try: try:
raw = newfile.read_text() raw = newfile.read_text()
encrypted: str = GPG().encrypt(raw, config.server.theirkey, sign=config.server.ourkey) encrypted: str = GPG().encrypt(raw, config.server.theirkey, sign=config.server.ourkey, always_trust=True)
upfl = BytesIO(encrypted.data) upfl = BytesIO(encrypted.data)
uppath = Path(config.server.inpath) / f"{directory.name}_{newfile.name}.pgp" uppath = Path(config.server.inpath) / f"{directory.name}_{newfile.name}.pgp"