]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
stroke: List registered KDFs
authorTobias Brunner <tobias@strongswan.org>
Wed, 9 Feb 2022 15:18:30 +0000 (16:18 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2022 16:54:24 +0000 (18:54 +0200)
src/libcharon/plugins/stroke/stroke_list.c

index 92b18a8a67ede7fd2f6fbbd43595900b58c2c553..1c44fefbaf832e0fe6163fb82ba16ea0d5586f8d 100644 (file)
@@ -849,6 +849,7 @@ static void list_algs(FILE *out)
        hash_algorithm_t hash;
        pseudo_random_function_t prf;
        ext_out_function_t xof;
+       key_derivation_function_t kdf;
        drbg_type_t drbg;
        diffie_hellman_group_t group;
        rng_quality_t quality;
@@ -905,6 +906,14 @@ static void list_algs(FILE *out)
                print_alg(out, &len, ext_out_function_names, xof, plugin_name);
        }
        enumerator->destroy(enumerator);
+       fprintf(out, "\n  kdf:       ");
+       len = 13;
+       enumerator = lib->crypto->create_kdf_enumerator(lib->crypto);
+       while (enumerator->enumerate(enumerator, &kdf, &plugin_name))
+       {
+               print_alg(out, &len, key_derivation_function_names, kdf, plugin_name);
+       }
+       enumerator->destroy(enumerator);
        fprintf(out, "\n  drbg:      ");
        len = 13;
        enumerator = lib->crypto->create_drbg_enumerator(lib->crypto);