Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dev] Clean up deprecation warnings from vault_darwin.c #2639

Closed
ycombinator opened this issue May 9, 2023 · 2 comments · Fixed by #2962
Closed

[Dev] Clean up deprecation warnings from vault_darwin.c #2639

ycombinator opened this issue May 9, 2023 · 2 comments · Fixed by #2962
Labels
Cleanup Team:Elastic-Agent Label for the Agent team

Comments

@ycombinator
Copy link
Contributor

ycombinator commented May 9, 2023

As a developer of Elastic Agent, whenever I run any command on Mac OS that involves running go build, e.g. mage -l, the following deprecation warnings are shown:

# github.com/elastic/elastic-agent/internal/pkg/agent/vault
vault_darwin.c:65:23: warning: 'SecKeychainSetPreferenceDomain' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:446:10: note: 'SecKeychainSetPreferenceDomain' has been explicitly marked deprecated here
vault_darwin.c:67:18: warning: 'SecKeychainCopyDomainDefault' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:430:10: note: 'SecKeychainCopyDomainDefault' has been explicitly marked deprecated here
vault_darwin.c:77:23: warning: 'SecKeychainFindGenericPassword' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:628:10: note: 'SecKeychainFindGenericPassword' has been explicitly marked deprecated here
vault_darwin.c:85:22: warning: 'SecKeychainItemModifyAttributesAndData' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychainItem.h:165:10: note: 'SecKeychainItemModifyAttributesAndData' has been explicitly marked deprecated here
vault_darwin.c:90:9: warning: 'SecKeychainItemFreeContent' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychainItem.h:220:10: note: 'SecKeychainItemFreeContent' has been explicitly marked deprecated here
vault_darwin.c:115:22: warning: 'SecKeychainItemCreateFromContent' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychainItem.h:181:10: note: 'SecKeychainItemCreateFromContent' has been explicitly marked deprecated here
vault_darwin.c:146:23: warning: 'SecKeychainFindGenericPassword' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:628:10: note: 'SecKeychainFindGenericPassword' has been explicitly marked deprecated here
vault_darwin.c:159:9: warning: 'SecKeychainItemFreeContent' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychainItem.h:220:10: note: 'SecKeychainItemFreeContent' has been explicitly marked deprecated here
vault_darwin.c:174:23: warning: 'SecKeychainFindGenericPassword' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:628:10: note: 'SecKeychainFindGenericPassword' has been explicitly marked deprecated here
vault_darwin.c:191:23: warning: 'SecKeychainFindGenericPassword' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:628:10: note: 'SecKeychainFindGenericPassword' has been explicitly marked deprecated here
vault_darwin.c:198:18: warning: 'SecKeychainItemDelete' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychainItem.h:257:10: note: 'SecKeychainItemDelete' has been explicitly marked deprecated here

It would be nice to have these cleaned up so the actual output of the command is seen right after the command is executed.

@ycombinator
Copy link
Contributor Author

@aleksmaus Looks like the APIs mentioned in the deprecation warnings were first used in #398. Is this cleanup something you could help with?

@cmacknz cmacknz added the Team:Elastic-Agent Label for the Agent team label May 9, 2023
@aleksmaus
Copy link
Member

@aleksmaus Looks like the APIs mentioned in the deprecation warnings were first used in #398. Is this cleanup something you could help with?

Sure can take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants