Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

rgerganov
Copy link

No description provided.

@cemeyer
Copy link
Owner

cemeyer commented Jan 22, 2019

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.

Copy link
Owner

@cemeyer cemeyer left a 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')
Copy link
Owner

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')
Copy link
Owner

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)]))).

@cemeyer
Copy link
Owner

cemeyer commented Jan 22, 2019

FYI: basically same as dlenski#1

rgerganov pushed a commit to rgerganov/rsa_ct_kip that referenced this pull request Jan 23, 2019
Fixing runtime errors encountered using python3
@rgerganov
Copy link
Author

Not needed anymore.

@rgerganov rgerganov closed this Jan 23, 2019
rgerganov pushed a commit to rgerganov/rsa_ct_kip that referenced this pull request Feb 13, 2019
Fixing runtime errors encountered using python3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants