-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix client.py to work with python3.4+ #1
Conversation
Oh yeah, sorry. I have some of these exact same changes in my local tree but didn't clean them up and push them yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM. I found all of these changes to be necessary too but hadn't pushed them yet, sorry. I think the assertion change can be reduced a little, if you can confirm it wasn't needed for you.
@@ -51,11 +51,11 @@ def parse_ServerResponse(self, response): | |||
assert x.tag == '{http://schemas.xmlsoap.org/soap/envelope/}Envelope' | |||
r = x.find('.//{http://ctkipservice.rsasecurity.com}' + outer) | |||
ad = r.find('{http://ctkipservice.rsasecurity.com}AuthData') | |||
assert ad.text == self.auth == response.headers.get('Authorization') | |||
#assert ad.text == self.auth == response.headers.get('Authorization') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My server doesn't send Authorization
either, but for me the ad.text == self.auth
assertion still held. Does it not for you?
@@ -122,17 +122,24 @@ def serverFinished(self, session_id, server_nonce, client_none=None): | |||
if client_none is None: | |||
client_nonce = random.getrandbits(16*8) | |||
cipher = PKCS1_OAEP.new(self.server_pubkey) | |||
client_nonce = client_nonce.to_bytes(16, byteorder='big') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's a lot better than what I have (bytes(bytearray([random.getrandbits(8) for i in range(16)]))
).
FYI: basically same as dlenski#1 |
Fixing runtime errors encountered using python3
Not needed anymore. |
Fixing runtime errors encountered using python3
No description provided.