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

Reinit sign context in soter tests #319

Merged
merged 1 commit into from
Aug 29, 2018
Merged

Conversation

ignatk
Copy link
Contributor

@ignatk ignatk commented Aug 29, 2018

When we verify signature (even incorrect one), usually the internal hash/digest
context is finalised and cannot be reused. OpenSSL is one exception: by default
it creates an internal copy of the digest context and finalises the copy, so the
original context can be reused, but it is not a generic case. Since Themis may
have other cryptobackends, update the test to cover more generic cases, where
internal hash context cannot be reused.

When we verify signature (even incorrect one), usually the internal hash/digest
context is finalised and cannot be reused. OpenSSL is one exception: by default
it creates an internal copy of the digest context and finalises the copy, so the
original context can be reused, but it is not a generic case. Since Themis may
have other cryptobackends, update the test to cover more generic cases, where
internal hash context cannot be reused.
@vixentael vixentael added the tests Themis test suite label Aug 29, 2018
@vixentael
Copy link
Contributor

thank you, nice catch!

is it the only test that should be updated in such way?

@ignatk
Copy link
Contributor Author

ignatk commented Aug 29, 2018

Seems so. There is hmac as well, but we don't use hmac from backends, rather we have own implementation, which uses only hash from the backend.

@ignatk ignatk merged commit 294fd6b into cossacklabs:master Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Themis test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants