szezon meg a fazon
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2021-04-26 22:06:07 +02:00
parent d40b20e753
commit b4a9ccb334
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -52,6 +52,9 @@ class NetWrapper:
def serverIdentify(self, msg: bytes) -> None:
incommingJson = json.loads(msg.decode('UTF-8'))
header = json.loads(b64decode(incommingJson['header']).decode('UTF-8'))
self.clientAddr = header['source']
self.currentUser = header['username']
self.currentClientPublicKey = self.clientPublicKey[self.currentUser]
try:
if not self.verifyRSAHeaderSignature(b64decode(incommingJson['header']),
b64decode(incommingJson['headersignature'])) or header[
@ -59,9 +62,6 @@ class NetWrapper:
raise Exception('Bad initial message')
except Exception:
raise Exception('Bad initial message')
self.clientAddr = header['source']
self.currentUser = header['username']
self.currentClientPublicKey = self.clientPublicKey[self.currentUser]
retheader, retheadersignature = self.signRSAHeader("IDY", {})
retmsg = self.ecryptRSAMessage(b64decode(incommingJson['message']).decode('UTF-8'))
identMsg = json.dumps(