Skip to content

Remove duplicate certificate chain - #8

Open
celledge wants to merge 1 commit into
unidoc:masterfrom
celledge:master
Open

Remove duplicate certificate chain#8
celledge wants to merge 1 commit into
unidoc:masterfrom
celledge:master

Conversation

@celledge

Copy link
Copy Markdown

sign.go: addSignerChain() was adding the chain to the list of certs twice which leads to an invalid DER set with duplicates which strict DER parsers will reject.

sign_test.go: x509.SHA1WithRSA is now explicitly rejected by the Go certificate validation as insecure. The tests were failing with go 1.24. Certificates generated in the tests have been updated. The invalid signatures have been removed from TestSigs() sigalgs.

Renamed the ExampleSignedData to TestExampleSignedData because recent versions of go require Example functions to be niladic. The function would need to be rewritten without using t *testing.T to remain an Example.

Please note that verify_test.go is still using certificates with SHA1, so it no longer passes tests and will need to have those certificates replaced. I do not know where those were generated originally, so I have not fixed them in this commit. Skipping verify_test, the remaining tests pass.

sign.go: addSignerChain() was adding the chain to the list of certs twice which
leads to an invalid DER set with duplicates which strict DER parsers will
reject.

sign_test.go: x509.SHA1WithRSA is now explicitly rejected by the Go
certificate validation as insecure. The tests were failing with go 1.24.
Certificates generated in the tests have been updated. The invalid
signatures have been removed from TestSigs() sigalgs.

Please note that verify_test.go is still using certificates with SHA1, so
it no longer passes tests and will need to have those certificates replaced.
I do not know where those were generated originally, so I have not fixed
them in this commit. Skipping verify_test, the remaining tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant