Skip to content

Commit 6c71615

Browse files
fetch timestamps before submitting to rekor (#1463)
1 parent a4c9d96 commit 6c71615

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ All versions prior to 0.9.0 are untracked.
6767
configure the used Sigstore instance [#1358]/(https://github.com/sigstore/sigstore-python/pull/1358)
6868
* By default (when `--trust-config` is not used) the whole trust configuration now
6969
comes from the TUF repository [#1363](https://github.com/sigstore/sigstore-python/pull/1363)
70+
* If the user provided TSA urls, rfc3161 timestamps are now fetched **before** submitting
71+
entries to rekor. [#1463](https://github.com/sigstore/sigstore-python/pull/1463)
7072

7173
### Removed
7274
* API:

sigstore/sign.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,6 @@ def _finalize_sign(
178178
"""
179179
Perform the common "finalizing" steps in a Sigstore signing flow.
180180
"""
181-
# Submit the proposed entry to the transparency log
182-
entry = self._signing_ctx._rekor.create_entry(proposed_entry)
183-
184-
_logger.debug(f"Transparency log entry created with index: {entry.log_index}")
185-
186181
# If the user provided TSA urls, timestamps the response
187182
signed_timestamp = []
188183
for tsa_client in self._signing_ctx._tsa_clients:
@@ -193,6 +188,10 @@ def _finalize_sign(
193188
f"Unable to use {tsa_client.url} to timestamp the bundle. Failed with {e}"
194189
)
195190

191+
# Submit the proposed entry to the transparency log
192+
entry = self._signing_ctx._rekor.create_entry(proposed_entry)
193+
_logger.debug(f"Transparency log entry created with index: {entry.log_index}")
194+
196195
return Bundle._from_parts(cert, content, entry, signed_timestamp)
197196

198197
def sign_dsse(

0 commit comments

Comments
 (0)