File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Yubico.YubiKey/src/Yubico/YubiKey/Fido2/Commands Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -72,13 +72,16 @@ public EnumerateRpsBeginResponse(ResponseApdu responseApdu)
7272 {
7373 var credentialManagementData = _response . GetData ( ) ;
7474
75- if ( credentialManagementData . RelyingParty is not null &&
75+ bool conditionsMet =
76+ credentialManagementData . RelyingParty is not null &&
7677 credentialManagementData . RelyingPartyIdHash is not null &&
7778 credentialManagementData . TotalRelyingPartyCount is not null &&
78- credentialManagementData . RelyingParty . IsMatchingRelyingPartyId ( credentialManagementData . RelyingPartyIdHash . Value ) )
79+ credentialManagementData . RelyingParty . IsMatchingRelyingPartyId ( credentialManagementData . RelyingPartyIdHash . Value ) ;
80+
81+ if ( conditionsMet )
7982 {
8083 return ( credentialManagementData . TotalRelyingPartyCount . Value , credentialManagementData . RelyingParty ) ;
81- }
84+ }
8285
8386 throw new Ctap2DataException ( ExceptionMessages . InvalidFido2Info ) ;
8487 }
Original file line number Diff line number Diff line change @@ -43,9 +43,13 @@ public EnumerateRpsGetNextResponse(ResponseApdu responseApdu)
4343 public RelyingParty GetData ( )
4444 {
4545 var credentialManagementData = _response . GetData ( ) ;
46- if ( credentialManagementData . RelyingParty is not null &&
46+
47+ bool conditionsMet =
48+ credentialManagementData . RelyingParty is not null &&
4749 credentialManagementData . RelyingPartyIdHash is not null &&
48- credentialManagementData . RelyingParty . IsMatchingRelyingPartyId ( credentialManagementData . RelyingPartyIdHash . Value ) )
50+ credentialManagementData . RelyingParty . IsMatchingRelyingPartyId ( credentialManagementData . RelyingPartyIdHash . Value ) ;
51+
52+ if ( conditionsMet )
4953 {
5054 return credentialManagementData . RelyingParty ;
5155 }
You can’t perform that action at this time.
0 commit comments