]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commit
Model: migrate iOS 14 keychain references to iOS 15 format
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 23 Sep 2021 04:00:14 +0000 (06:00 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 23 Sep 2021 04:11:19 +0000 (06:11 +0200)
commit03a59ff38e96fb3bb5dde2f15fe42198d1dfb995
treee1b94dbb6fa106542120db366ef6dd8d2d6aaf4b
parentabf506c1fea651b0f7a8dba1573a9806b553c861
Model: migrate iOS 14 keychain references to iOS 15 format

Keychain references used to be bijective, but with the change in format,
Apple tried to be too clever, and references are no longer bijective.
This lead to us deleting keychain entries, which in turn emptied out
people's configs upon upgrading to iOS 15. Disaster!

Fix this by detecting the change in format and saving the new password
reference. We still rely on this being bijective moving forward;
hopefully this bug won't repeat itself. It would be nice to not rely on
that property, but doing so without grinding startup to a halt isn't
obviously done, given how slow the keychain accesses are and how limited
the API is.

Reported-by: Eddie <stunnel@attglobal.net>
Reported-by: Anatoli <me@anatoli.ws>
Reported-by: Alan Graham <alan@meshify.app>
Reported-by: Jacob Wilder <oss@jacobwilder.org>
Reported-by: Miguel Arroz <miguel.arroz@gmail.com>
Reported-by: Reid Rankin <reidrankin@gmail.com>
Reported-by: Fabien <patate.cosmique@pm.me>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Sources/Shared/Model/NETunnelProviderProtocol+Extension.swift