Commit Graph

80 Commits

Author SHA1 Message Date
Davide De Rosa 88cd62064a Handle continuation in PUSH_REPLY 2019-04-16 23:59:56 +02:00
Davide De Rosa 0a956f5b9f Handle dhcp-option PROXY_BYPASS 2019-04-13 19:23:02 +02:00
Davide De Rosa 5fb70b5bab Parse dhcp-option PROXY_HTTP* into Configuration 2019-04-12 08:10:47 +02:00
Davide De Rosa 4af8305f7a Fix unit tests 2019-04-11 16:47:55 +02:00
Davide De Rosa 55534df6fa Work around cipher/digest/framing issues
- Make them optional
- Set default values inside SessionProxy

Fallback is not needed anywhere else.
2019-04-04 18:51:06 +02:00
Davide De Rosa a2250686b6 Merge OptionsBundle into Configuration
FIXME: issues with non-optional .cipher and .compressionFraming

Because:

- No pushed cipher (nil) is NOT .aes128cbc
- No pushed framing (nil) is NOT .disabled

Breaks conditions on pushed cipher/framing via PUSH_REPLY.
2019-04-04 18:51:06 +02:00
Davide De Rosa 7aec0637b2 Move endpoints inside SessionProxy.Configuration
Make optional.

TunnelKitProvider still gets hostname from .serverAddress rather
than SessionProxy.Configuration

Also drop useless Equatable implementations.
2019-04-04 13:09:50 +02:00
Davide De Rosa 370e68aa3f Parse search domain from dhcp-option DOMAIN 2019-04-03 14:29:09 +02:00
Davide De Rosa b48575a13a Split tests related to options parsing 2019-04-03 13:22:55 +02:00
Davide De Rosa 9876c81de5 Parse PUSH_REPLY options in OptionsBundle
- auth-token
- peer-id
- Routing

Reorganize options by semantic.

Reuse OptionsBundle in PushReply.
2019-04-03 13:19:21 +02:00
Davide De Rosa d22420c06b Rearrange some unit tests 2019-04-02 18:58:35 +02:00
Davide De Rosa 11fd418f82 Extend encrypted private key quick test
Test .ovpn didn't use an PKCS#8 key due to a slip-up. Fixing it
unveiled that isEncrypted returned false for PKCS#8 keys.

Fixes #80
2019-04-02 11:41:18 +02:00
Davide De Rosa 22f80735ca Strip certificate preamble
Fixes #78
2019-04-02 00:55:58 +02:00
Davide De Rosa 559bb6607c Add and test PKCS#8 decryption
Fixes #80
2019-04-02 00:34:23 +02:00
Davide De Rosa 47b80d5361 Refactor to decrypt generic key 2019-04-02 00:31:54 +02:00
Davide De Rosa 0bfc1e08eb Fix retarded Swift pointer API somehow 2019-03-30 23:18:45 +01:00
Davide De Rosa 7b59276875 Comment out deprecated methods used in perf tests 2019-03-30 23:18:45 +01:00
Davide De Rosa 207a4f063a Replace deprecated Data(bytes:) 2019-03-30 23:18:45 +01:00
Davide De Rosa 596ec00943 Fix a wrong compression test
--compress lzo is indeed supported.
2019-03-30 23:18:45 +01:00
Davide De Rosa b07ec88ff2 Add passphrase parameter to ConfigurationParser
Use it to decrypt encrypted PEMs.
2019-03-25 18:48:59 +01:00
Davide De Rosa e5393f81b8 Test decrypt .pem with encrypted private key 2019-03-25 18:45:01 +01:00
Davide De Rosa 0eb0e3e478 Parse compression from several places
- PUSH_REPLY
- .ovpn configuration
- TunnelKitProvider
2019-03-19 15:14:29 +01:00
Davide De Rosa 197679057d Return NSData from parsePayloadWithBlock
More friendly to (de)compression stage.
2019-03-19 15:12:56 +01:00
Davide De Rosa 5cc32b1060 Wrap minilzo into dynamic Obj-C plugin
Handle library errors to some extent.
2019-03-19 15:12:46 +01:00
Davide De Rosa 7d69e09c53 Update copyright 2019-03-09 11:44:18 +01:00
Davide De Rosa e849e6c0da Reject <connection> blocks in .ovpn
- Use enumerateComponents for boolean test.
- Fix a test compile error on the way.
2019-03-04 17:39:37 +01:00
Davide De Rosa 9544e59fcf Fix missing try in test 2019-02-27 20:08:59 +01:00
Davide De Rosa 367e8b7e08 Track whether server pushed a compression option 2019-02-25 23:01:21 +01:00
Davide De Rosa c244b29a8f Parse DNS servers from configuration 2019-01-05 22:29:16 +01:00
Davide De Rosa 0302803d3e Test configuration parser 2018-11-10 10:58:06 +01:00
Davide De Rosa 3a6efaecc6 Reuse tests for macOS target 2018-11-05 18:37:15 +01:00
Davide De Rosa d5b292c61d Bump version 2018-11-05 15:48:27 +01:00
Davide De Rosa 9c989dabf5 Fix IPv4/UInt32 calculations 2018-10-28 00:26:15 +02:00
Davide De Rosa 3cc511822d Deprecate debugLogKey, hardcode filename 2018-10-25 22:36:31 +02:00
Davide De Rosa 917427fc0c Fix unit tests after refactoring 2018-10-25 18:34:03 +02:00
Davide De Rosa 60ac9fc672 Bump minor version 2018-10-25 18:33:44 +02:00
Davide De Rosa 617a72fbea Bump version and fix latest CHANGELOG 2018-10-24 21:06:04 +02:00
Davide De Rosa bbaa60c3bd Bump version and update CHANGELOG 2018-10-22 15:47:36 +02:00
Davide De Rosa 29ec39f151 Bump minor version 2018-10-19 17:25:11 +02:00
Davide De Rosa fbd3f977d5 Parse static key from file 2018-10-19 17:22:26 +02:00
Davide De Rosa 55e0aa5c5a Implement and test crypt serializer 2018-10-19 17:06:26 +02:00
Davide De Rosa 3ec4a7d292 Implement AES-CTR encryption 2018-10-19 16:56:20 +02:00
Davide De Rosa a430beb35f Improve Swift bridging of CryptoFlags 2018-10-19 16:56:20 +02:00
Davide De Rosa 31babe56f0 Fix tests formerly broken by flags.iv 2018-10-19 16:21:13 +02:00
Davide De Rosa 8ccc4c08a5 Add auth strategy 2018-10-19 16:20:56 +02:00
Davide De Rosa bff9352c6e Handle encryption/peer-id in a stateless manner
Fixes #30
2018-10-19 15:54:55 +02:00
Davide De Rosa 872e20a95a Add function to compute MD5 from certificate 2018-10-18 12:32:22 +02:00
Davide De Rosa 11e9160acb Bump version again 2018-10-10 22:23:26 +02:00
Davide De Rosa 20d6d6747e Bump version
Take from command line, not file (unused after `1d3071b`).
2018-10-10 18:59:50 +02:00
Davide De Rosa 98c5a015f3 Split endpoint and credentials
Basically drop AuthenticatedEndpoint.
2018-10-06 16:22:02 +02:00