smimesign
smimesign copied to clipboard
Fix timestamp response buffer allocation if response size is unknown.
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.