Update Demo and tests

This commit is contained in:
Davide De Rosa 2020-12-28 16:30:26 +01:00
parent 33bc533da2
commit c64cb79bfe
3 changed files with 10 additions and 9 deletions

View File

@ -1,16 +1,16 @@
PODS: PODS:
- OpenSSL-Apple (1.1.1h.8) - OpenSSL-Apple (1.1.1h.8)
- SwiftyBeaver (1.9.3) - SwiftyBeaver (1.9.3)
- TunnelKit (3.0.0): - TunnelKit (3.1.0):
- TunnelKit/Protocols/OpenVPN (= 3.0.0) - TunnelKit/Protocols/OpenVPN (= 3.1.0)
- TunnelKit/AppExtension (3.0.0): - TunnelKit/AppExtension (3.1.0):
- SwiftyBeaver - SwiftyBeaver
- TunnelKit/Core - TunnelKit/Core
- TunnelKit/Core (3.0.0): - TunnelKit/Core (3.1.0):
- SwiftyBeaver - SwiftyBeaver
- TunnelKit/Manager (3.0.0): - TunnelKit/Manager (3.1.0):
- SwiftyBeaver - SwiftyBeaver
- TunnelKit/Protocols/OpenVPN (3.0.0): - TunnelKit/Protocols/OpenVPN (3.1.0):
- OpenSSL-Apple (~> 1.1.1h.8) - OpenSSL-Apple (~> 1.1.1h.8)
- TunnelKit/AppExtension - TunnelKit/AppExtension
- TunnelKit/Core - TunnelKit/Core
@ -32,7 +32,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
OpenSSL-Apple: 70990157548ecf94885310231aff52db698e1077 OpenSSL-Apple: 70990157548ecf94885310231aff52db698e1077
SwiftyBeaver: 2e8acd6fc90c6d0a27055867a290794926d57c02 SwiftyBeaver: 2e8acd6fc90c6d0a27055867a290794926d57c02
TunnelKit: 231da80bc3ccbcad7cad1e661f8e08cd26703fc0 TunnelKit: 4db9180956f8aaf4ab152fd0d38c6c9c63a46cf8
PODFILE CHECKSUM: 518aaea9a529c96ba3024918bc0850dd6e92ac61 PODFILE CHECKSUM: 518aaea9a529c96ba3024918bc0850dd6e92ac61

View File

@ -179,8 +179,8 @@ M69t86apMrAxkUxVJAWLRBd9fbYyzJgTW61tFqXWTZpiz6bhuWApSEzaHcL3/f5l
sessionBuilder.endpointProtocols = [EndpointProtocol(socketType, port)] sessionBuilder.endpointProtocols = [EndpointProtocol(socketType, port)]
sessionBuilder.clientCertificate = clientCertificate sessionBuilder.clientCertificate = clientCertificate
sessionBuilder.clientKey = clientKey sessionBuilder.clientKey = clientKey
sessionBuilder.mtu = 1350
var builder = OpenVPNTunnelProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build()) var builder = OpenVPNTunnelProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build())
builder.mtu = 1350
builder.shouldDebug = true builder.shouldDebug = true
builder.masksPrivateData = false builder.masksPrivateData = false
return builder.build() return builder.build()

View File

@ -65,6 +65,7 @@ class AppExtensionTests: XCTestCase {
sessionBuilder.digest = .sha256 sessionBuilder.digest = .sha256
sessionBuilder.hostname = hostname sessionBuilder.hostname = hostname
sessionBuilder.endpointProtocols = [] sessionBuilder.endpointProtocols = []
sessionBuilder.mtu = 1230
builder = OpenVPNTunnelProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build()) builder = OpenVPNTunnelProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build())
XCTAssertNotNil(builder) XCTAssertNotNil(builder)
@ -87,7 +88,7 @@ class AppExtensionTests: XCTestCase {
XCTAssertEqual(proto?.providerConfiguration?[K.cipherAlgorithm] as? String, cfg.sessionConfiguration.cipher?.rawValue) XCTAssertEqual(proto?.providerConfiguration?[K.cipherAlgorithm] as? String, cfg.sessionConfiguration.cipher?.rawValue)
XCTAssertEqual(proto?.providerConfiguration?[K.digestAlgorithm] as? String, cfg.sessionConfiguration.digest?.rawValue) XCTAssertEqual(proto?.providerConfiguration?[K.digestAlgorithm] as? String, cfg.sessionConfiguration.digest?.rawValue)
XCTAssertEqual(proto?.providerConfiguration?[K.ca] as? String, cfg.sessionConfiguration.ca?.pem) XCTAssertEqual(proto?.providerConfiguration?[K.ca] as? String, cfg.sessionConfiguration.ca?.pem)
XCTAssertEqual(proto?.providerConfiguration?[K.mtu] as? Int, cfg.mtu) XCTAssertEqual(proto?.providerConfiguration?[K.mtu] as? Int, cfg.sessionConfiguration.mtu)
XCTAssertEqual(proto?.providerConfiguration?[K.renegotiatesAfter] as? TimeInterval, cfg.sessionConfiguration.renegotiatesAfter) XCTAssertEqual(proto?.providerConfiguration?[K.renegotiatesAfter] as? TimeInterval, cfg.sessionConfiguration.renegotiatesAfter)
XCTAssertEqual(proto?.providerConfiguration?[K.debug] as? Bool, cfg.shouldDebug) XCTAssertEqual(proto?.providerConfiguration?[K.debug] as? Bool, cfg.shouldDebug)
} }