Fix broken == on OpenVPN.Configuration

StaticKey was not comparing data by value.
This commit is contained in:
Davide De Rosa 2022-04-07 00:16:34 +02:00
parent 02d04185d3
commit f33a854943
1 changed files with 6 additions and 0 deletions

View File

@ -214,6 +214,12 @@ extension OpenVPN {
return try? JSONEncoder().encode(self) return try? JSONEncoder().encode(self)
} }
// MARK: Equatable
public static func ==(lhs: Self, rhs: Self) -> Bool {
return lhs.secureData.toData() == rhs.secureData.toData()
}
// MARK: Codable // MARK: Codable
public init(from decoder: Decoder) throws { public init(from decoder: Decoder) throws {