Skip to content

Commit 19950d8

Browse files
committed
Add comment about slight deviation from ETag spec
1 parent d40637d commit 19950d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

webauthn-server-attestation/src/main/java/com/yubico/fido/metadata/FidoMetadataDownloader.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,10 @@ private Optional<MetadataBLOB> refreshBlobInternal(
879879
final ByteArray downloadedBytes =
880880
download(
881881
blobUrl,
882+
// This should ideally use the value of the ETag response header from when the cached
883+
// BLOB was downloaded, but we don't have anywhere to store that without changing the
884+
// format of the cache serialization. This is good enough as the MDS explicitly
885+
// specifies that the ETag is set to the "no" of the BLOB.
882886
cached.map(cachedBlob -> String.format("%d", cachedBlob.getPayload().getNo())));
883887
final MetadataBLOB downloadedBlob = parseAndVerifyBlob(downloadedBytes, trustRoot);
884888
log.debug("New BLOB downloaded.");

0 commit comments

Comments
 (0)