Add keydir to local options

This commit is contained in:
Davide De Rosa 2019-04-20 17:20:45 +02:00
parent 9b8be02c2a
commit 707db2c6de
2 changed files with 3 additions and 9 deletions

View File

@ -116,14 +116,8 @@ extension SessionProxy {
break
}
}
if let strategy = options.tlsWrap?.strategy {
switch strategy {
case .auth:
opts.append("tls-auth")
case .crypt:
opts.append("tls-crypt")
}
if let direction = options.tlsWrap?.key.direction?.rawValue {
opts.append("keydir \(direction)")
}
let optsString = opts.joined(separator: ",")
log.debug("TLS.auth: Local options: \(optsString)")

View File

@ -58,7 +58,7 @@ public class StaticKey: Codable {
private let secureData: ZeroingData
private let direction: Direction?
let direction: Direction?
/// Returns the encryption key.
///