You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the tests on the current download (as of 3-Mar-2023) the TestBuildStringToSign test fails because of the environmental newline in windows. The actual signing process uses \n whereas StringBuilder under Windows uses \n\r.
Here is the fix:
`
[Fact]
public void TestBuildStringToSign()
{
string expectedCanonicalHash = "foo";
StringBuilder expectedStringBuilder = new StringBuilder();
expectedStringBuilder.Append("AWS4-HMAC-SHA256\n");
expectedStringBuilder.Append(ISOSigningDateTime+"\n");
expectedStringBuilder.AppendFormat("{0}/{1}/execute-api/aws4_request\n", ISOSigningDate, TestRegion);
expectedStringBuilder.Append(expectedCanonicalHash);
string result = awsSignerHelperUnderTest.BuildStringToSign(SigningDate, expectedCanonicalHash, TestRegion);
Assert.Equal(expectedStringBuilder.ToString(), result);
}
`
The AppendLine is replaced with Append and a manual \n is added to the end of the line to match the hard-coded signing process.
The text was updated successfully, but these errors were encountered:
Thank you for sharing this issue and the recommended fix with us.
It has been transferred to one of our internal teams in order to work on the corresponding changes.
This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.
When running the tests on the current download (as of 3-Mar-2023) the TestBuildStringToSign test fails because of the environmental newline in windows. The actual signing process uses \n whereas StringBuilder under Windows uses \n\r.
Here is the fix:
`
`
The AppendLine is replaced with Append and a manual \n is added to the end of the line to match the hard-coded signing process.
The text was updated successfully, but these errors were encountered: