keybase / go-keychain

Golang keychain package for iOS and macOS
MIT License
573 stars 120 forks source link

Deprecated libcall SecKeychainItemDelete #88

Closed jdblack closed 1 year ago

jdblack commented 2 years ago

Running the example code provided in readme.MD provides the following deprecation warning

cgo-gcc-prolog:53:11: warning: 'SecKeychainItemDelete' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychainItem.h:257:10: note: 'SecKeychainItemDelete' has been explicitly marked deprecated here

Versions: OSX Monterey 12.5.1 go 1.19 github.com/keybase/go-keychain v0.0.0-20221114143418-13d058a3d612

https://developer.apple.com/documentation/security/1400090-seckeychainitemdelete indicates that this call has indeed been deprecated.

jdblack commented 1 year ago

It it looks like the new libcall is OSStatus SecItemDelete(CFDictionaryRef query) may be the replacement for OSStatus SecKeychainItemDelete(SecKeychainItemRef itemRef).

tylerd-canva commented 1 year ago

But we already have DeleteItem: https://github.com/keybase/go-keychain/blob/master/keychain.go#L521

Maybe https://github.com/keybase/go-keychain/pull/76 had the right idea and https://github.com/keybase/go-keychain/pull/77 should be reverted?