]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Modify ocv test sets for python3
authorMasashi Honma <masashi.honma@gmail.com>
Thu, 24 Jan 2019 07:46:15 +0000 (16:46 +0900)
committerJouni Malinen <j@w1.fi>
Sat, 26 Jan 2019 11:15:32 +0000 (13:15 +0200)
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
tests/hwsim/test_ocv.py

index 49fb8f0b5adb54779e178385586a2e88710fc644..5f5d91550109b734eb23dbb5fb7de9638b8ac52c 100644 (file)
@@ -22,7 +22,7 @@ from test_ap_psk import parse_eapol, build_eapol, pmk_to_ptk, eapol_key_mic, rec
 
 def make_ocikde(op_class, channel, seg1_idx):
     WLAN_EID_VENDOR_SPECIFIC = 221
-    RSN_KEY_DATA_OCI = "\x00\x0f\xac\x0d"
+    RSN_KEY_DATA_OCI = b"\x00\x0f\xac\x0d"
 
     data = RSN_KEY_DATA_OCI + struct.pack("<BBB", op_class, channel, seg1_idx)
     ocikde = struct.pack("<BB", WLAN_EID_VENDOR_SPECIFIC, len(data)) + data
@@ -403,7 +403,7 @@ class APConnection:
     def test_bad_oci(self, logmsg, op_class, channel, seg1_idx):
         logger.debug("Bad OCI element: " + logmsg)
         if op_class is None:
-            ocikde = ""
+            ocikde = b''
         else:
             ocikde = make_ocikde(op_class, channel, seg1_idx)
 
@@ -768,7 +768,7 @@ class STAConnection:
     def test_bad_oci(self, logmsg, op_class, channel, seg1_idx, errmsg):
         logger.info("Bad OCI element: " + logmsg)
         if op_class is None:
-            ocikde = ""
+            ocikde = b''
         else:
             ocikde = make_ocikde(op_class, channel, seg1_idx)