From 3c637c75214bbc0cc0b3d66c6ac18941f7b00421 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Wed, 1 Apr 2026 13:49:08 +0200 Subject: [PATCH] openssl: Fix return value if returning EdDSA public key fails --- src/libstrongswan/plugins/openssl/openssl_ed_private_key.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstrongswan/plugins/openssl/openssl_ed_private_key.c b/src/libstrongswan/plugins/openssl/openssl_ed_private_key.c index 39968f776..e676fe897 100644 --- a/src/libstrongswan/plugins/openssl/openssl_ed_private_key.c +++ b/src/libstrongswan/plugins/openssl/openssl_ed_private_key.c @@ -140,12 +140,12 @@ METHOD(private_key_t, get_public_key, public_key_t*, if (!EVP_PKEY_get_raw_public_key(this->key, NULL, &key.len)) { - return FALSE; + return NULL; } key = chunk_alloca(key.len); if (!EVP_PKEY_get_raw_public_key(this->key, key.ptr, &key.len)) { - return FALSE; + return NULL; } public = lib->creds->create(lib->creds, CRED_PUBLIC_KEY, this->type, BUILD_EDDSA_PUB, key, BUILD_END);