Fix timestamp response buffer allocation if response size is unknown.#118
Open
wlynch wants to merge 1 commit intogithub:mainfrom
Open
Fix timestamp response buffer allocation if response size is unknown.#118wlynch wants to merge 1 commit intogithub:mainfrom
wlynch wants to merge 1 commit intogithub:mainfrom
Conversation
When trying this out against freetsa.org, I got the following error: ``` runtime error: makeslice: cap out of range ``` This seems to stem from the buffer allocation if ContentLength = -1. From the net/http docs: ``` ContentLength records the length of the associated content. The value -1 indicates that the length is unknown. ``` Not sure why working with freetsa is causing a -1 to be returned, but this changes the behavior to work in either case.
wlynch
added a commit
to wlynch/gitsign
that referenced
this pull request
Oct 14, 2022
Adds GITSIGN_TIMESTAMP_AUTHORITY config option for specifying a TSA URL in the gitsign config. Also adds an e2e test since this is a pain to test without a real TSA. Note: certain TSA (notably freetsa.org) do not work due to a bug. github/smimesign#118. Trying to fix upstream.
wlynch
added a commit
to wlynch/gitsign
that referenced
this pull request
Oct 14, 2022
Adds GITSIGN_TIMESTAMP_AUTHORITY config option for specifying a TSA URL in the gitsign config. Also adds an e2e test since this is a pain to test without a real TSA. Note: certain TSA (notably freetsa.org) do not work due to a bug. github/smimesign#118. Trying to fix upstream. Signed-off-by: Billy Lynch <billy@chainguard.dev>
wlynch
added a commit
to sigstore/gitsign
that referenced
this pull request
Oct 17, 2022
Adds GITSIGN_TIMESTAMP_AUTHORITY config option for specifying a TSA URL in the gitsign config. Also adds an e2e test since this is a pain to test without a real TSA. Note: certain TSA (notably freetsa.org) do not work due to a bug. github/smimesign#118. Trying to fix upstream. Signed-off-by: Billy Lynch <billy@chainguard.dev> Signed-off-by: Billy Lynch <billy@chainguard.dev>
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.
When trying this out against freetsa.org, I got the following error:
This seems to stem from the buffer allocation if ContentLength = -1. From the net/http docs:
Not sure why working with freetsa is causing a -1 to be returned, but this changes the behavior to work in either case.