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

Check proper initialization for SupportEd25519 #204

Merged
merged 6 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,4 @@ jobs:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Run Test
# This line is temporary. We are currently working on a fix to fully support Mariner 2.0. Once the fix is merged, we will remove this line.
continue-on-error: true
run: go test -v ./...
8 changes: 7 additions & 1 deletion ed25519.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ func SupportsEd25519() bool {
onceSupportsEd25519.Do(func() {
switch vMajor {
case 1:
supportsEd25519 = versionAtOrAbove(1, 1, 1)
if versionAtOrAbove(1, 1, 1) {
ctx := C.go_openssl_EVP_PKEY_CTX_new_id(C.GO_EVP_PKEY_ED25519, nil)
if ctx != nil {
C.go_openssl_EVP_PKEY_CTX_free(ctx)
supportsEd25519 = true
}
}
case 3:
name := C.CString("ED25519")
defer C.free(unsafe.Pointer(name))
Expand Down
Loading