Commit 6781d3797f for strongswan.org

commit 6781d3797f54e9e1237a0630da9b02fea989a0bd
Author: Tobias Brunner <tobias@strongswan.org>
Date:   Wed Nov 18 10:14:24 2026 +0100

    botan: Support encoding the ECDSA curve as OID

    There is no direct way to get the curve ID, so we encode the key and
    extract it from there (using the helper to avoid a dependency on the
    pkcs1 plugin).

diff --git a/src/libstrongswan/plugins/botan/botan_ec_public_key.c b/src/libstrongswan/plugins/botan/botan_ec_public_key.c
index c411cdf8d3..59f3a77e97 100644
--- a/src/libstrongswan/plugins/botan/botan_ec_public_key.c
+++ b/src/libstrongswan/plugins/botan/botan_ec_public_key.c
@@ -218,6 +218,18 @@ METHOD(public_key_t, get_encoding, bool,
 	private_botan_ec_public_key_t *this, cred_encoding_type_t type,
 	chunk_t *encoding)
 {
+	if (type == PUBKEY_ECDSA_CURVE_DER)
+	{
+		chunk_t spki;
+
+		if (botan_get_encoding(this->key, PUBKEY_SPKI_ASN1_DER, &spki))
+		{
+			*encoding = ecdsa_curve_from_spki(spki);
+			chunk_free(&spki);
+			return encoding->len != 0;
+		}
+		return FALSE;
+	}
 	return botan_get_encoding(this->key, type, encoding);
 }