From d03f1bd9afa19ea3165f530c3a075bafa031771b Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Tue, 26 Mar 2019 00:36:36 +0100 Subject: [PATCH] Fix checksEKU not propagated to TunnelKitProvider --- CHANGELOG.md | 6 ++++++ .../AppExtension/TunnelKitProvider+Configuration.swift | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3d19f3..eb18d5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- `checksEKU` not propagated to TunnelKitProvider. + ## 1.5.1 (2019-03-25) ### Added diff --git a/TunnelKit/Sources/AppExtension/TunnelKitProvider+Configuration.swift b/TunnelKit/Sources/AppExtension/TunnelKitProvider+Configuration.swift index 70c052e..74029fc 100644 --- a/TunnelKit/Sources/AppExtension/TunnelKitProvider+Configuration.swift +++ b/TunnelKit/Sources/AppExtension/TunnelKitProvider+Configuration.swift @@ -190,6 +190,7 @@ extension TunnelKitProvider { sessionConfigurationBuilder.keepAliveInterval = providerConfiguration[S.keepAlive] as? TimeInterval ?? ConfigurationBuilder.defaults.sessionConfiguration.keepAliveInterval sessionConfigurationBuilder.renegotiatesAfter = providerConfiguration[S.renegotiatesAfter] as? TimeInterval ?? ConfigurationBuilder.defaults.sessionConfiguration.renegotiatesAfter sessionConfigurationBuilder.usesPIAPatches = providerConfiguration[S.usesPIAPatches] as? Bool ?? ConfigurationBuilder.defaults.sessionConfiguration.usesPIAPatches + sessionConfigurationBuilder.checksEKU = providerConfiguration[S.checksEKU] as? Bool ?? ConfigurationBuilder.defaults.sessionConfiguration.checksEKU sessionConfigurationBuilder.dnsServers = providerConfiguration[S.dnsServers] as? [String] sessionConfigurationBuilder.randomizeEndpoint = providerConfiguration[S.randomizeEndpoint] as? Bool ?? ConfigurationBuilder.defaults.sessionConfiguration.randomizeEndpoint sessionConfiguration = sessionConfigurationBuilder.build() @@ -260,6 +261,8 @@ extension TunnelKitProvider { static let renegotiatesAfter = "RenegotiatesAfter" static let usesPIAPatches = "UsesPIAPatches" + + static let checksEKU = "ChecksEKU" static let dnsServers = "DNSServers" @@ -427,6 +430,9 @@ extension TunnelKitProvider { if let usesPIAPatches = sessionConfiguration.usesPIAPatches { dict[S.usesPIAPatches] = usesPIAPatches } + if let checksEKU = sessionConfiguration.checksEKU { + dict[S.checksEKU] = checksEKU + } if let dnsServers = sessionConfiguration.dnsServers { dict[S.dnsServers] = dnsServers }