proposal: Handle skipping DH groups directly in select() and matches()
Also renames the flag.
This commit is contained in:
@@ -434,6 +434,10 @@ static bool select_algos(private_proposal_t *this, proposal_t *other,
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (type == DIFFIE_HELLMAN_GROUP && (flags & PROPOSAL_SKIP_DH))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (select_algo(this, other, type, flags, selected != NULL, &alg, &ks))
|
||||
{
|
||||
if (alg == 0 && type != EXTENDED_SEQUENCE_NUMBERS)
|
||||
|
||||
@@ -60,8 +60,8 @@ enum proposal_selection_flag_t {
|
||||
PROPOSAL_ALLOW_PRIVATE = (1<<0),
|
||||
/** Whether to prefer configured or supplied proposals. */
|
||||
PROPOSAL_PREFER_CONFIGURED = (1<<1),
|
||||
/** Whether to strip out diffie hellman groups */
|
||||
PROPOSAL_STRIP_DH = (1<<2),
|
||||
/** Whether to skip and ignore diffie hellman groups. */
|
||||
PROPOSAL_SKIP_DH = (1<<2),
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user