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

Skip SHA test that require marshaling #1384

Open
wants to merge 3 commits into
base: microsoft/main
Choose a base branch
from

Conversation

qmuntal
Copy link
Contributor

@qmuntal qmuntal commented Oct 31, 2024

Some OpenSSL providers (looking at you SymCrypt) don't support marshaling the internal state of the hash function. There are some tests that require that functionality to succeed. We were previously skipping those tests when using the CNG backend, which doesn't implement digest marshaling. This PR generalizes the way we detect that a given digest doesn't support marshaling so it also works for OpenSSL.

Base automatically changed from dev/qmuntal/osslupgr to microsoft/main October 31, 2024 11:13
Copy link
Member

@dagood dagood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to have a test that specifically makes sure we don't unintentionally remove marshaller support from specific OpenSSL backend scenarios... but that's probably the role of scenario testing because here we're simply doing the best we can per-platform.

}

h := tt.new()
+ if _, ok := h.(encoding.BinaryMarshaler); !ok {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing if boring.Enabled {? (Just looking at the pattern, haven't checked the context beyond the cutoff. 😄)

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.

3 participants