From d40b20e75392af9e4750e46d1228e491d8490d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Mon, 26 Apr 2021 22:02:06 +0200 Subject: [PATCH] fix public key shittery --- server/netwrapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/netwrapper.py b/server/netwrapper.py index e33728e..a09cc71 100644 --- a/server/netwrapper.py +++ b/server/netwrapper.py @@ -26,7 +26,7 @@ class NetWrapper: self.authenticationInstance = authenticationInstance def ecryptRSAMessage(self, message: str) -> bytes: - cipher_rsa = PKCS1_OAEP.new(self.clientPublicKey) + cipher_rsa = PKCS1_OAEP.new(self.currentClientPublicKey) encrypted_msg = cipher_rsa.encrypt(message.encode('UTF-8')) return encrypted_msg @@ -40,7 +40,7 @@ class NetWrapper: def verifyRSAHeaderSignature(self, header: bytes, headersignature: bytes) -> bool: h = SHA512.new(header) try: - pkcs1_15.new(self.clientPublicKey).verify(h, headersignature) + pkcs1_15.new(self.currentClientPublicKey).verify(h, headersignature) return True except Exception: return False