Skip to content

Commit 6189676

Browse files
authored
make SupportsHKDF provider-aware (#188)
1 parent 0eb9dd4 commit 6189676

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

hkdf.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ import (
1313
)
1414

1515
func SupportsHKDF() bool {
16-
return versionAtOrAbove(1, 1, 1)
16+
ctx := C.go_openssl_EVP_PKEY_CTX_new_id(C.GO_EVP_PKEY_HKDF, nil)
17+
if ctx == nil {
18+
return false
19+
}
20+
C.go_openssl_EVP_PKEY_CTX_free(ctx)
21+
return false
1722
}
1823

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

0 commit comments

Comments
 (0)