]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Write GTK locations into debug log in key_lifetime_in_memory
authorJouni Malinen <j@w1.fi>
Sun, 6 Dec 2015 15:48:43 +0000 (17:48 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 6 Dec 2015 15:48:43 +0000 (17:48 +0200)
It looks like it is possible for the GTK to be found from memory every
now and then. This makes these test cases fail. Write the memory
addresses in which the GTK was found to the log to make it somewhat
easier to try to figure out where the key can be left in memory.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_eap.py
tests/hwsim/test_ap_ft.py
tests/hwsim/test_ap_psk.py
tests/hwsim/test_erp.py
tests/hwsim/test_sae.py

index 5ec67f05e5f45b5246dca0bcfa26c860c3db82cf..da1d2e3c407d259bdd4124d2850a5c00950de988 100644 (file)
@@ -3424,6 +3424,7 @@ def test_wpa2_eap_ttls_pap_key_lifetime_in_memory(dev, apdev, params):
     if tk in buf:
         raise Exception("TK found from memory")
     if gtk in buf:
+        get_key_locations(buf, gtk, "GTK")
         raise Exception("GTK found from memory")
 
     logger.info("Checking keys in memory after disassociation")
index a342c5343b7eb093e24c505504a57626e8e29f64..d2995c8ca39cbd7d9c7d2816ae9ad040497bc804 100644 (file)
@@ -652,6 +652,7 @@ def test_ft_psk_key_lifetime_in_memory(dev, apdev, params):
     if tk in buf:
         raise Exception("TK found from memory")
     if gtk in buf:
+        get_key_locations(buf, gtk, "GTK")
         raise Exception("GTK found from memory")
 
     logger.info("Checking keys in memory after disassociation")
index cdf67b93fa768f31ca8d5847566c0670f5073cac..f3d4b04b49b14bda94a1d9714fcfd97529d9602b 100644 (file)
@@ -1792,6 +1792,7 @@ def test_wpa2_psk_key_lifetime_in_memory(dev, apdev, params):
     if tk in buf:
         raise Exception("TK found from memory")
     if gtk in buf:
+        get_key_locations(buf, gtk, "GTK")
         raise Exception("GTK found from memory")
 
     logger.info("Checking keys in memory after disassociation")
index c4f2fa52171c6190ef3d5fddc624c486af2f28ec..1388337bc84d820fd63065d1e904d8afbcdfcab9 100644 (file)
@@ -313,6 +313,7 @@ def test_erp_key_lifetime_in_memory(dev, apdev, params):
     if tk in buf:
         raise Exception("TK found from memory")
     if gtk in buf:
+        get_key_locations(buf, gtk, "GTK")
         raise Exception("GTK found from memory")
 
     logger.info("Checking keys in memory after disassociation")
index ba70f75f94c14d857913f359e02b7c3d058943fe..32ee8b1139ccee4fa69d66a3daad51ad95d2915e 100644 (file)
@@ -331,6 +331,7 @@ def test_sae_key_lifetime_in_memory(dev, apdev, params):
     if tk in buf:
         raise Exception("TK found from memory")
     if gtk in buf:
+        get_key_locations(buf, gtk, "GTK")
         raise Exception("GTK found from memory")
     verify_not_present(buf, sae_k, fname, "SAE(k)")
     verify_not_present(buf, sae_keyseed, fname, "SAE(keyseed)")