Skip to content

Commit bd96333

Browse files
committed
fix ossl 1.1.0
1 parent b762849 commit bd96333

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ec.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ func SupportsCurve(curve string) bool {
2222
}
2323

2424
var supportsX25519 = sync.OnceValue(func() bool {
25+
if !versionAtOrAbove(1, 1, 1) {
26+
// X25519 support was added in OpenSSL 1.1.0, but the APIs we use
27+
// to implement it were only added in 1.1.1.
28+
return false
29+
}
2530
ctx, _ := ossl.EVP_PKEY_CTX_new_id(ossl.EVP_PKEY_X25519, nil)
2631
if ctx != nil {
2732
ossl.EVP_PKEY_CTX_free(ctx)

0 commit comments

Comments
 (0)