Commit 3c637c7521 for strongswan.org
commit 3c637c75214bbc0cc0b3d66c6ac18941f7b00421
Author: Tobias Brunner <tobias@strongswan.org>
Date: Wed Apr 1 13:49:08 2026 +0200
openssl: Fix return value if returning EdDSA public key fails
diff --git a/src/libstrongswan/plugins/openssl/openssl_ed_private_key.c b/src/libstrongswan/plugins/openssl/openssl_ed_private_key.c
index 39968f7763..e676fe8977 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);