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

Fix SupportsHash to correctly detect unsupported hashed on OpenSSL 1 #195

Closed
wants to merge 5 commits into from

Conversation

mertakman
Copy link
Collaborator

No description provided.

@mertakman mertakman marked this pull request as draft September 26, 2024 09:51
@mertakman mertakman changed the base branch from v2 to add-mariner-2 September 26, 2024 12:21
Comment on lines +102 to +108
return C.go_openssl_EVP_sha3_224()
case crypto.SHA3_256:
if versionAtOrAbove(1, 1, 1) {
return C.go_openssl_EVP_sha3_256()
}
return C.go_openssl_EVP_sha3_256()
case crypto.SHA3_384:
if versionAtOrAbove(1, 1, 1) {
return C.go_openssl_EVP_sha3_384()
}
return C.go_openssl_EVP_sha3_384()
case crypto.SHA3_512:
if versionAtOrAbove(1, 1, 1) {
return C.go_openssl_EVP_sha3_512()
}
return C.go_openssl_EVP_sha3_512()
Copy link
Collaborator

Choose a reason for hiding this comment

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

CI is complaining when using OpenSSL 1.0.2 and 1.1.1 because this functions are only defined in OpenSSL 1.1.1 and above. The versionAtOrAbove is necessary here.

@qmuntal qmuntal changed the title Correctly return null pointer for unsupported hashes Fix SupportsHash to correctly detect unsupported hashed on OpenSSL 1 Sep 26, 2024
@qmuntal qmuntal deleted the branch golang-fips:add-mariner-2 September 26, 2024 16:17
@qmuntal qmuntal closed this Sep 26, 2024
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.

2 participants