-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ctclient to support SCT extensions
According to RFC 6962 (Section 3.4), the 'extensions' field defined for SCT is also included in 'MerkleTreeLeaf.TimestampedEntry'. Since the current MerkleTreeLeaf functions (e.g., CreateX509MerkleTreeLeaf()) don't support to specify this field, we need to manually fill it in order to calculate the correct leaf hash. As suggested, we chose not to change the signatures of those functions to avoid breaking external dependencies. * Update LogClient.VerifySCTSignature() to fill the 'extensions' field from 'sct.Extensions'. * Update ctclient's get-entries command to print the extensions if non-empty, which can be parsed by the 'get-inclusion-proof' command similar to the 'timestamp' field for convenience. * Update ctclient's upload command to calculate the leaf hash with the 'sct.Extensions'; also print the SCT extensions as hex string in the end, which may be used by the 'get-inclusion-proof' command. * Update ctclient's get-inclusion-proof command to add the '--extensions' flag to specify the SCT extensions returned by 'upload' command. Signed-off-by: Aaron LI <aaronly.me@gmail.com>
- Loading branch information
1 parent
8a203c2
commit e9832e5
Showing
4 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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