parent
119d2f02e4
commit
7ea088e4a1
|
@ -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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Handle `--data-ciphers` from OpenVPN 2.5
|
||||||
|
|
||||||
## 3.2.0 (2021-01-07)
|
## 3.2.0 (2021-01-07)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -156,7 +156,11 @@ extension OpenVPN {
|
||||||
}
|
}
|
||||||
|
|
||||||
// peer info
|
// peer info
|
||||||
raw.appendSized(Z(CoreConfiguration.OpenVPN.peerInfo, nullTerminated: true))
|
var extra: [String: String] = [:]
|
||||||
|
if let dataCiphers = options.dataCiphers {
|
||||||
|
extra["IV_CIPHERS"] = dataCiphers.map { $0.rawValue }.joined(separator: ":")
|
||||||
|
}
|
||||||
|
raw.appendSized(Z(CoreConfiguration.OpenVPN.peerInfo(extra: extra), nullTerminated: true))
|
||||||
|
|
||||||
if CoreConfiguration.logsSensitiveData {
|
if CoreConfiguration.logsSensitiveData {
|
||||||
log.debug("TLS.auth: Put plaintext (\(raw.count) bytes): \(raw.toHex())")
|
log.debug("TLS.auth: Put plaintext (\(raw.count) bytes): \(raw.toHex())")
|
||||||
|
|
|
@ -63,7 +63,7 @@ extension CoreConfiguration {
|
||||||
|
|
||||||
// MARK: Authentication
|
// MARK: Authentication
|
||||||
|
|
||||||
static let peerInfo: String = {
|
static func peerInfo(extra: [String: String]? = nil) -> String {
|
||||||
let platform: String
|
let platform: String
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
platform = "ios"
|
platform = "ios"
|
||||||
|
@ -83,9 +83,12 @@ extension CoreConfiguration {
|
||||||
if LZOIsSupported() {
|
if LZOIsSupported() {
|
||||||
info.append("IV_LZO=1")
|
info.append("IV_LZO=1")
|
||||||
}
|
}
|
||||||
|
if let extra = extra {
|
||||||
|
info.append(contentsOf: extra.map { "\($0)=\($1)" })
|
||||||
|
}
|
||||||
info.append("")
|
info.append("")
|
||||||
return info.joined(separator: "\n")
|
return info.joined(separator: "\n")
|
||||||
}()
|
}
|
||||||
|
|
||||||
static let randomLength = 32
|
static let randomLength = 32
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue