99designs/keyring

Using the deprecated function of go-keyring

SgtDaJim opened this issue · 5 comments

When I built my cli app, a warning occured:

# github.com/keybase/go-keychain
cgo-gcc-prolog:202:11: warning: 'SecTrustedApplicationCreateFromPath' is deprecated: first deprecated in macOS 10.15 - No longer supported [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecTrustedApplication.h:59:10: note: 'SecTrustedApplicationCreateFromPath' has been explicitly marked deprecated here

Maybe the package should be updated?

osok commented

I'm having the same issue on one of my developers boxes. They just upgraded to Catalina. I'm using High Sierra and it works fine.

in your go.mod use

replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4
n11c commented

It looks like keybase/go-keychain addressed the issue by removing that bit of code altogether: keybase/go-keychain@378d9d7

I did a quick and dirty test and it works fine for me: https://github.com/n11c/keyring/tree/fix-catalina-deprecation

Happy to clean it up and make a PR if you feel this is the way to go.

@n11c if you could send the PR it would be great! Otherwise let me know and I can take a crack at it :D

n11c commented