Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The signer test explicitly sets with_signature_time=True, leaving constructor defaults untested and allowing a regression to False to pass unnoticed.
1 open issue
What changed in this PR
Adds default SignatureTime generation to Data signing, addressing #101, and extends timestamp generation for signed Interests. Applications can opt out through signer constructors or keychain signing arguments.
Changes:
- Enable optional SignatureTime generation across software and platform-backed signers.
- Forward the opt-out flag through keychains and TPMs, with separate cached signer variants.
- Add timestamp and opt-out tests, and adjust wire-format fixtures.
| File | Description |
|---|---|
| tests/security/signer_test.py | Adds timestamp and opt-out coverage across signers. |
| tests/misc/nfd_mgmt_test.py | Updates command fixtures for timestamped signatures. |
| tests/integration/keychain_test.py | Tests opt-out propagation and separate cache entries. |
| tests/encoding/ndn_format_0_3_test.py | Disables timestamps to preserve fixed wire fixtures. |
| src/ndn/security/tpm/tpm.py | Adds the timestamp option to the TPM interface. |
| src/ndn/security/tpm/tpm_osx_keychain.py | Supports configurable timestamps in macOS signing. |
| src/ndn/security/tpm/tpm_file.py | Forwards the timestamp option to file-backed signers. |
| src/ndn/security/tpm/tpm_cng.py | Supports configurable timestamps in Windows signing. |
| src/ndn/security/signer/sha256_rsa_signer.py | Enables RSA signature timestamps by default. |
| src/ndn/security/signer/sha256_hmac_signer.py | Enables HMAC signature timestamps by default. |
| src/ndn/security/signer/sha256_ecdsa_signer.py | Enables ECDSA signature timestamps by default. |
| src/ndn/security/signer/sha256_digest_signer.py | Separates timestamp generation from Interest nonce generation. |
| src/ndn/security/signer/ed25519_signer.py | Enables Ed25519 signature timestamps by default. |
| src/ndn/security/keychain/keychain.py | Documents the timestamp opt-out argument. |
| src/ndn/security/keychain/keychain_sqlite3.py | Propagates the flag and distinguishes cached variants. |
| src/ndn/security/keychain/keychain_digest.py | Forwards timestamp preferences to digest signers. |
Review effort: Balanced
Refactor signer factory creation to use a helper function for improved readability and maintainability. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fix: #101