Skip to content

Commit 6430bf9

Browse files
committed
Windows: Check that pHmacSecret is populated
1 parent efb81ef commit 6430bf9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fido2/client/windows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def make_credential(self, options, event=None):
306306
if obj.dwVersion >= 4 and options.extensions.get("credProps"):
307307
extension_outputs["credProps"] = {"rk": bool(obj.bResidentKey)}
308308
if "hmac-secret" in extensions_out:
309-
if obj.dwVersion >= 7:
309+
if obj.dwVersion >= 7 and obj.pHmacSecret:
310310
secret = obj.pHmacSecret.contents
311311
secrets = (secret.first, secret.second)
312312
else:
@@ -474,7 +474,7 @@ def get_assertion(self, options, event=None):
474474
extension_outputs["appid"] = bool(u2f_appid_used.value)
475475

476476
if options.extensions:
477-
if obj.dwVersion >= 3 and hmac_secret_salts:
477+
if obj.dwVersion >= 3 and obj.pHmacSecret:
478478
secret = obj.pHmacSecret.contents
479479
if "prf" in options.extensions:
480480
result = {"first": secret.first}

0 commit comments

Comments
 (0)