Send IV_LZO only if supported

This commit is contained in:
Davide De Rosa 2019-03-25 10:07:57 +01:00
parent 04fbbb1fe1
commit 71d54e2dc3
1 changed files with 16 additions and 11 deletions

View File

@ -77,17 +77,22 @@ struct CoreConfiguration {
// MARK: Authentication // MARK: Authentication
static let peerInfo = [ static let peerInfo: String = {
"IV_VER=2.4", var info = [
"IV_PLAT=mac", "IV_VER=2.4",
"IV_UI_VER=\(identifier) \(version)", "IV_PLAT=mac",
"IV_PROTO=2", "IV_UI_VER=\(identifier) \(version)",
"IV_NCP=2", "IV_PROTO=2",
"IV_SSL=\(CryptoBox.version())", "IV_NCP=2",
"IV_LZO=1", "IV_SSL=\(CryptoBox.version())",
"IV_LZO_STUB=1", "IV_LZO_STUB=1",
"" ]
].joined(separator: "\n") if LZOIsSupported() {
info.append("IV_LZO=1")
}
info.append("")
return info.joined(separator: "\n")
}()
static let randomLength = 32 static let randomLength = 32