Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: 2 flaky OPC timestamping tests #671

Open
dtivel opened this issue Mar 20, 2024 · 0 comments
Open

Test: 2 flaky OPC timestamping tests #671

dtivel opened this issue Mar 20, 2024 · 0 comments
Labels
Priority:2 Work that is important, but not critical for the release test Test-related issue

Comments

@dtivel
Copy link
Collaborator

dtivel commented Mar 20, 2024

Two tests failed then passed on rerun for 394fc50:

details
System.Security.Cryptography.CryptographicException : ASN1 corrupted data.\r\n---- System.Formats.Asn1.AsnContentException : The provided data does not represent a valid tag.
at System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest.ProcessResponse(ReadOnlyMemory`1 source, Rfc3161TimestampToken& token, Rfc3161RequestResponseStatus& status, Int32& bytesConsumed, Boolean shouldThrow)
at System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest.ProcessResponse(ReadOnlyMemory`1 responseBytes, Int32& bytesConsumed)
at Sign.Core.Timestamp.TimestampBuilder.SubmitTimestampRequest(Uri timestampUri, Oid digestOid, TimestampNonce nonce, TimeSpan timeout, Byte[] digest) in /_/src/Sign.Core/Tools/VsixSignTool/Timestamp/TimestampBuilder.netcoreapp.cs:line 34
at Sign.Core.OpcPackageTimestampBuilder.SignAsync(Uri timestampServer, HashAlgorithmName timestampAlgorithm) in /_/src/Sign.Core/Tools/VsixSignTool/OpcPackageTimestampBuilder.cs:line 51
at Sign.Core.Test.OpcPackageSigningTests.ShouldTimestampFileWithRsa(Int32 keySizeInBits, HashAlgorithmName hashAlgorithmName, HashAlgorithmName timestampDigestAlgorithm) in /_/test/Sign.Core.Test/Tools/VSIXSignTool/OpcPackageSigningTests.cs:line 83
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
at System.Formats.Asn1.AsnDecoder.ReadEncodedValue(ReadOnlySpan`1 source, AsnEncodingRules ruleSet, Int32& contentOffset, Int32& contentLength, Int32& bytesConsumed)
at System.Formats.Asn1.AsnValueReader.PeekEncodedValue()
at System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest.ProcessResponse(ReadOnlyMemory`1 source, Rfc3161TimestampToken& token, Rfc3161RequestResponseStatus& status, Int32& bytesConsumed, Boolean shouldThrow)
details
Assert.True() Failure\r\nExpected: True\r\nActual:   False

at Sign.Core.Test.Crypt32Tests.ShouldTimestampData() in /_/test/Sign.Core.Test/Tools/VSIXSignTool/Crypt32Tests.cs:line 34
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

The next best step would probably be to add logging to the timestamp server to log every request/response. Or, if Visual Studio's "Run Until Failure" feature works well enough, locally debug a failure.

CC @javierdlg

@dtivel dtivel added the Priority:2 Work that is important, but not critical for the release label Mar 20, 2024
@dtivel dtivel added the test Test-related issue label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:2 Work that is important, but not critical for the release test Test-related issue
Projects
None yet
Development

No branches or pull requests

1 participant