@@ -72,7 +72,7 @@ def verify_create_response(response, create_request, expected_origin):
7272 if alg not in (p ['alg' ] for p in create_request ['pubKeyCredParams' ]):
7373 raise Exception ("Public key algorithm not in list of accepted key types. Rejecting." )
7474
75- # testing explicitly for ECDSA algorithm
75+ # verify parameters for supported algorithms
7676 if alg == COSE_ALG_ECDSA :
7777 if kty != COSE_KTY_EC2 :
7878 raise Exception (f"Invalid key type specified: expected { COSE_KTY_EC2 } (EC2), received { kty } " )
@@ -110,7 +110,7 @@ def verify_create_response(response, create_request, expected_origin):
110110 assert (signing_cert .version == x509 .Version .v3 )
111111 try :
112112 fido_oid = signing_cert .extensions .get_extension_for_oid (x509 .ObjectIdentifier ("1.3.6.1.4.1.45724.1.1.4" ))
113- assert (fido_oid .critical == False )
113+ assert (fido_oid .critical is False )
114114 cert_aaguid_der = fido_oid .value .value
115115 # strip first two header bytes for OCTET STRING of length 16
116116 assert (cert_aaguid_der [:2 ] == b'\x04 \x10 ' )
@@ -119,7 +119,7 @@ def verify_create_response(response, create_request, expected_origin):
119119 except x509 .ExtensionNotFound :
120120 # no FIDO OID found in cert.
121121 pass
122- assert (signing_cert .extensions .get_extension_for_oid (x509 .oid .ExtensionOID .BASIC_CONSTRAINTS ).value .ca == False )
122+ assert (signing_cert .extensions .get_extension_for_oid (x509 .oid .ExtensionOID .BASIC_CONSTRAINTS ).value .ca is False )
123123 signing_key = signing_cert .public_key ()
124124 signing_key .verify (sig , att_payload , ec .ECDSA (hashes .SHA256 ()))
125125 if len (att_stmt ['x5c' ]) > 1 :
0 commit comments