Skip to content

Commit

Permalink
op-mode: T6424: ipsec: filter out duplicate CA certificates in Apple …
Browse files Browse the repository at this point in the history
…IOS profile
  • Loading branch information
c-po committed Jun 9, 2024
1 parent fba5644 commit 40bff02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/op_mode/ikev2_profile_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@
}
data['ca_certificates'].append(tmp)

# Remove duplicate list entries for CA certificates, as they are added by their common name
# https://stackoverflow.com/a/9427216
data['ca_certificates'] = [dict(t) for t in {tuple(d.items()) for d in data['ca_certificates']}]

esp_proposals = conf.get_config_dict(ipsec_base + ['esp-group', data['esp_group'], 'proposal'],
key_mangling=('-', '_'), get_first_key=True)
ike_proposal = conf.get_config_dict(ipsec_base + ['ike-group', data['ike_group'], 'proposal'],
Expand Down

0 comments on commit 40bff02

Please sign in to comment.