Skip to content

Commit

Permalink
make SupportsHKDF provider-aware
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Sep 13, 2024
1 parent 0eb9dd4 commit e649aac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hkdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ import (
)

func SupportsHKDF() bool {
return versionAtOrAbove(1, 1, 1)
ctx := C.go_openssl_EVP_PKEY_CTX_new_id(C.GO_EVP_PKEY_HKDF, nil)
if ctx == nil {
return false
}
C.go_openssl_EVP_PKEY_CTX_free(ctx)
return false
}

func newHKDF(h func() hash.Hash, mode C.int) (*hkdf, error) {
Expand Down

0 comments on commit e649aac

Please sign in to comment.