diff options
author | Christian Breunig <christian@breunig.cc> | 2024-05-30 17:18:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 17:18:26 +0200 |
commit | e26fcfb0bb254deea26d9cf3c9707552eafcafe9 (patch) | |
tree | 68b97748dbcb2a3c3afa763c8036617717fb61a2 /data/templates/ipsec/ios_profile.j2 | |
parent | 94ee1d8f1f7f0c539c64f3f1e72e8fa8040a5a97 (diff) | |
parent | 55ae2ca0b17fa1d4cd19563289466c5e8dbbcf84 (diff) | |
download | vyos-1x-e26fcfb0bb254deea26d9cf3c9707552eafcafe9.tar.gz vyos-1x-e26fcfb0bb254deea26d9cf3c9707552eafcafe9.zip |
Merge pull request #3556 from vyos/mergify/bp/sagitta/pr-3552
op-mode: ipsec: T6407: fix profile generation (backport #3552)
Diffstat (limited to 'data/templates/ipsec/ios_profile.j2')
-rw-r--r-- | data/templates/ipsec/ios_profile.j2 | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/data/templates/ipsec/ios_profile.j2 b/data/templates/ipsec/ios_profile.j2 index eb74924b8..a9ae1c7a9 100644 --- a/data/templates/ipsec/ios_profile.j2 +++ b/data/templates/ipsec/ios_profile.j2 @@ -83,12 +83,15 @@ </dict> </dict> </dict> +{% if certs is vyos_defined %} <!-- This payload is optional but it provides an easy way to install the CA certificate together with the configuration --> +{% for cert in certs %} + <!-- Payload for: {{ cert.ca_cn }} --> <dict> <key>PayloadIdentifier</key> - <string>org.example.ca</string> + <string>org.{{ cert.ca_cn | lower | replace(' ', '.') | replace('_', '.') }}</string> <key>PayloadUUID</key> - <string>{{ '' | get_uuid }}</string> + <string>{{ cert.ca_cn | generate_uuid4 }}</string> <key>PayloadType</key> <string>com.apple.security.root</string> <key>PayloadVersion</key> @@ -96,9 +99,11 @@ <!-- This is the Base64 (PEM) encoded CA certificate --> <key>PayloadContent</key> <data> - {{ ca_cert }} + {{ cert.ca_cert }} </data> </dict> +{% endfor %} +{% endif %} </array> </dict> </plist> |