Do not fall back to AES-128-CBC when PUSH_REPLY has no cipher (#1073)

https://github.com/passepartoutvpn/passepartoutkit-source/pull/461
This commit is contained in:
Davide 2025-01-18 13:57:10 +01:00 committed by GitHub
parent 185dcf2887
commit 72d23cbd06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 1 deletions

@ -1 +1 @@
Subproject commit 59f755e34b46573b7ee4a6e88f3a74daca4da8cb
Subproject commit d46881b818ac532032324ad518c89779b7ae45a1

View File

@ -30,6 +30,20 @@ import XCTest
final class PushReplyTests: XCTestCase {
private let parser = StandardOpenVPNParser()
func test_givenMessage_whenNoOptions_thenHasNoFallbackValues() throws {
let msg = "PUSH_REPLY,redirect-gateway def1"
guard let reply = try parser.pushReply(with: msg) else {
XCTFail("No reply")
return
}
reply.debug()
XCTAssertNil(reply.options.cipher)
XCTAssertNil(reply.options.digest)
XCTAssertNil(reply.options.compressionFraming)
XCTAssertNil(reply.options.compressionAlgorithm)
}
func test_givenMessage_whenNet30_thenIsHandled() throws {
let msg = "PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 209.222.18.222,dhcp-option DNS 209.222.18.218,ping 10,comp-lzo no,route 10.5.10.1,topology net30,ifconfig 10.5.10.6 10.5.10.5,auth-token AUkQf/b3nj3L+CH4RJPP0Vuq8/gpntr7uPqzjQhncig="
guard let reply = try parser.pushReply(with: msg) else {