I tried to run the following program but it panic with: "Error { kind: MissingEntitlement, backtrace: , description: "SecKeychainItemCopyContent refused to return data" }"
extern crate keychain_services;
use keychain_services::{Keychain, keychain};
fn main() {
println!("Getting keychain...");
if let Ok(default_keychain) = Keychain::find_default() {
println!("Getting password...");
if let Ok(generic_password)
= keychain::item::GenericPassword::find(&default_keychain, "TestTest", "user") {
println!("Printing password...");
println!("Password: {}", generic_password.password().unwrap().as_str())
}
}
}
I tried codesign as instructed in the Apple Developer guide. I created a self-signed certificate. Then I used gimmedebugah to inject Info.plist to the binary. Lastly I run the codesign using the self-signed certificate. I can verify the app is correctly signed with the following command
> codesign --verify --deep --strict --verbose=2 my_app
my_app: valid on disk
my_app: satisfies its Designated Requirement
In the Info.plist injection step, I also tried to linker flag -sectcreate __TEXT __info_plist Info.plist -o my_app.out to the .cargo/config.
But the app still cannot retrieve password from keychain. Now I have no clue what to do next. Would you mind sharing any step-by-step guideline? It will be very useful!
I tried to run the following program but it panic with:
"Error { kind: MissingEntitlement, backtrace: , description: "SecKeychainItemCopyContent refused to return data" }"I tried
codesignas instructed in the Apple Developer guide. I created a self-signed certificate. Then I used gimmedebugah to injectInfo.plistto the binary. Lastly I run thecodesignusing the self-signed certificate. I can verify the app is correctly signed with the following commandIn the
Info.plistinjection step, I also tried to linker flag-sectcreate __TEXT __info_plist Info.plist -o my_app.outto the.cargo/config.But the app still cannot retrieve password from keychain. Now I have no clue what to do next. Would you mind sharing any step-by-step guideline? It will be very useful!