Skip to content

Commit

Permalink
Remove MustBeFresh from cert Interest; Add log when fetching error
Browse files Browse the repository at this point in the history
  • Loading branch information
zjkmxy committed Apr 14, 2024
1 parent 5701d78 commit 57f3f33
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/security/cert-storage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ Deno.test('Fetch missing certificate once', async () => {
const fetchedData = await endpoint.consume(
new Interest(
name`/${appPrefix}/8=node-1/data`,
Interest.MustBeFresh,
Interest.Lifetime(1000),
),
{
Expand Down
2 changes: 1 addition & 1 deletion src/security/cert-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export class CertStorage implements SecurityAgent {
const result = await endpoint.consume(
new Interest(
keyName,
Interest.MustBeFresh,
Interest.Lifetime(this.interestLifetime),
),
{
Expand All @@ -85,6 +84,7 @@ export class CertStorage implements SecurityAgent {

return Certificate.fromData(result);
} catch {
console.error(`Failed to fetch certificate: ${keyName.toString()}`);
return undefined;
}
}
Expand Down

0 comments on commit 57f3f33

Please sign in to comment.