Skip to content

Conversation

@qmuntal
Copy link
Collaborator

@qmuntal qmuntal commented Dec 1, 2025

Upstream Go supports passing 0 as key length in hkdf.Expand, and a test exercising this case has been recently added to .

OpenSSL doesn't like zero-length inputs, so we better don't call OpenSSL in this case and directly return an empty slice (which is the correct result).

While here, remove an unused parameter.

@qmuntal qmuntal marked this pull request as ready for review December 1, 2025 10:46
@qmuntal qmuntal requested review from dagood, gdams and karianna December 1, 2025 10:46
Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
@qmuntal qmuntal merged commit 9b5f537 into v2 Dec 2, 2025
112 checks passed
@qmuntal qmuntal deleted the dev/qmuntal/hkdfzero branch December 2, 2025 08:33
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.

5 participants