Skip to content

Commit

Permalink
Fix integration from main
Browse files Browse the repository at this point in the history
  • Loading branch information
Firehed committed Nov 21, 2023
1 parent 10ba0cf commit 85dce33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Codecs/Credential.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,10 @@ private function decodeV2(BinaryString $bytes): CredentialInterface
$rawAo = $bytes->read($aoLength);
$cdj = new BinaryString($bytes->read($cdjLength));
$ao = new AttestationObject(new BinaryString($rawAo));
$attestation = [$ao, $cdj];

Check warning on line 299 in src/Codecs/Credential.php

View check run for this annotation

Codecov / codecov/patch

src/Codecs/Credential.php#L294-L299

Added lines #L294 - L299 were not covered by tests
} else {
// Uhh??
$ao = $cdj = null;
$attestation = null;
}

return new CredentialV2(
Expand All @@ -310,8 +311,7 @@ private function decodeV2(BinaryString $bytes): CredentialInterface
isBackupEligible: $BE,
isBackedUp: $BS,
coseKey: new COSEKey(new BinaryString($cbor)),
ao: $ao,
attestationCDJ: $cdj,
attestation: $attestation,
);
}
}
3 changes: 1 addition & 2 deletions src/CreateResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ public function verify(
transports: $this->transports,
isBackupEligible: $authData->isBackupEligible(),
isBackedUp: $authData->isBackedUp(),
ao: $this->ao,
attestationCDJ: $this->clientDataJson,
attestation: [$this->ao, $this->clientDataJson],
);

// This is not part of the official procedure, but serves as a general
Expand Down

0 comments on commit 85dce33

Please sign in to comment.