File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11from __future__ import absolute_import
22
3+ import struct
4+
35# needed for SASL_GSSAPI authentication:
46try :
57 import gssapi
@@ -68,8 +70,8 @@ def receive(self, auth_bytes):
6870 client_flags = self .SASL_QOP_AUTH
6971 server_flags = msg [0 ]
7072 message_parts = [
71- bytes (client_flags & server_flags ),
72- msg [: 1 ],
73+ struct . Struct ( '>b' ). pack (client_flags & server_flags ),
74+ msg [1 : ],
7375 self .auth_id .encode ('utf-8' ),
7476 ]
7577 # add authorization identity to the response, and GSS-wrap
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ def mocked_message_wrapper(msg, *args):
3232 while not gssapi .is_done ():
3333 send_token = gssapi .auth_bytes ()
3434 receive_token = send_token # not realistic, but enough for testing
35- if send_token == b'\x00 cbar @foo' : # final wrapped message
35+ if send_token == b'\x01 ompletebar @foo' : # final wrapped message
3636 receive_token = b'' # final message gets an empty response
3737 gssapi .receive (receive_token )
3838 if client_ctx .step .call_count == 3 :
You can’t perform that action at this time.
0 commit comments