]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
unit-tests: Use a simple default IKE proposal to avoid issues with IKE_AUX
authorTobias Brunner <tobias@strongswan.org>
Tue, 26 Jun 2018 08:13:05 +0000 (10:13 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 14 May 2019 08:53:14 +0000 (10:53 +0200)
The exchange tests don't expect an IKE_AUX exchange so we don't want any
QSKE methods getting negotiated (in case they are proposed in the default
proposal).

src/libcharon/tests/utils/exchange_test_helper.c

index 97fa6fecd83d651b0620ae1f44897e8788adc8b5..8e58b9855ce807fc5ab6b3843e905c610fb1e7b1 100644 (file)
@@ -108,15 +108,12 @@ static ike_cfg_t *create_ike_cfg(bool initiator, exchange_test_sa_conf_t *conf)
        }
 
        ike_cfg = ike_cfg_create(&ike);
-       if (proposal)
-       {
-               ike_cfg->add_proposal(ike_cfg,
-                                                       proposal_create_from_string(PROTO_IKE, proposal));
-       }
-       else
+       if (!proposal)
        {
-               ike_cfg->add_proposal(ike_cfg, proposal_create_default(PROTO_IKE));
+               proposal = "aes256-sha256-ecp384";
        }
+       ike_cfg->add_proposal(ike_cfg,
+                                                 proposal_create_from_string(PROTO_IKE, proposal));
        return ike_cfg;
 }
 
@@ -336,6 +333,7 @@ void exchange_test_helper_init(char *plugins)
                        PLUGIN_PROVIDE(DH, MODP_2048_BIT),
                        PLUGIN_PROVIDE(DH, MODP_3072_BIT),
                        PLUGIN_PROVIDE(DH, ECP_256_BIT),
+                       PLUGIN_PROVIDE(DH, ECP_384_BIT),
                PLUGIN_REGISTER(NONCE_GEN, create_nonce_gen),
                        PLUGIN_PROVIDE(NONCE_GEN),
                                PLUGIN_DEPENDS(RNG, RNG_WEAK),