]> git.ipfire.org Git - thirdparty/git.git/commit
osxkeychain: replace deprecated SecKeychain API
authorBo Anderson <mail@boanderson.me>
Sat, 17 Feb 2024 23:34:53 +0000 (23:34 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Apr 2024 22:38:19 +0000 (15:38 -0700)
commit9abe31f5f161be4d69118bdfae00103cd6efa510
treee1605cd0a84ffd4886e1d31528d684d9f3d0c1eb
parentc2cbfbd2e28cbe27c194d62183b42f27a6a5bb87
osxkeychain: replace deprecated SecKeychain API

The SecKeychain API was deprecated in macOS 10.10, nearly 10 years ago.
The replacement SecItem API however is available as far back as macOS
10.6.

While supporting older macOS was perhaps prevously a concern,
git-credential-osxkeychain already requires a minimum of macOS 10.7
since 5747c8072b (contrib/credential: avoid fixed-size buffer in
osxkeychain, 2023-05-01) so using the newer API should not regress the
range of macOS versions supported.

Adapting to use the newer SecItem API also happens to fix two test
failures in osxkeychain:

    8 - helper (osxkeychain) overwrites on store
    9 - helper (osxkeychain) can forget host

The new API is compatible with credentials saved with the older API.

Signed-off-by: Bo Anderson <mail@boanderson.me>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/credential/osxkeychain/Makefile
contrib/credential/osxkeychain/git-credential-osxkeychain.c