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 1
1
from __future__ import absolute_import
2
2
3
+ import struct
4
+
3
5
# needed for SASL_GSSAPI authentication:
4
6
try :
5
7
import gssapi
@@ -68,8 +70,8 @@ def receive(self, auth_bytes):
68
70
client_flags = self .SASL_QOP_AUTH
69
71
server_flags = msg [0 ]
70
72
message_parts = [
71
- bytes (client_flags & server_flags ),
72
- msg [: 1 ],
73
+ struct . Struct ( '>b' ). pack (client_flags & server_flags ),
74
+ msg [1 : ],
73
75
self .auth_id .encode ('utf-8' ),
74
76
]
75
77
# 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):
32
32
while not gssapi .is_done ():
33
33
send_token = gssapi .auth_bytes ()
34
34
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
36
36
receive_token = b'' # final message gets an empty response
37
37
gssapi .receive (receive_token )
38
38
if client_ctx .step .call_count == 3 :
You can’t perform that action at this time.
0 commit comments