diff --git a/src/libstrongswan/crypto/proposal/proposal.c b/src/libstrongswan/crypto/proposal/proposal.c index ff687c58cf..80b3c74a6b 100644 --- a/src/libstrongswan/crypto/proposal/proposal.c +++ b/src/libstrongswan/crypto/proposal/proposal.c @@ -845,7 +845,7 @@ static int print_alg(private_proposal_t *this, printf_hook_data_t *data, enumerator = array_create_enumerator(this->transforms); while (enumerator->enumerate(enumerator, &entry)) { - char *prefix = "/"; + char *prefix = "/", ake_prefix[5] = ""; if (type != entry->type) { @@ -856,14 +856,19 @@ static int print_alg(private_proposal_t *this, printf_hook_data_t *data, prefix = ""; *first = FALSE; } + if (is_ke_transform(type) && type != KEY_EXCHANGE_METHOD) + { + sprintf(ake_prefix, "KE%d_", type - ADDITIONAL_KEY_EXCHANGE_1 + 1); + } if (names) { - written += print_in_hook(data, "%s%N", prefix, names, entry->alg); + written += print_in_hook(data, "%s%s%N", prefix, ake_prefix, + names, entry->alg); } else { - written += print_in_hook(data, "%sUNKNOWN_%u_%u", prefix, - entry->type, entry->alg); + written += print_in_hook(data, "%s%sUNKNOWN_%u_%u", prefix, + ake_prefix, entry->type, entry->alg); } if (entry->key_size) {