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

is darling-corecrypto already included in main darlingHQ #8

Open
paianoa opened this issue Mar 20, 2021 · 6 comments
Open

is darling-corecrypto already included in main darlingHQ #8

paianoa opened this issue Mar 20, 2021 · 6 comments

Comments

@paianoa
Copy link

paianoa commented Mar 20, 2021

Sorry, not clear if darling-corecrypto is already included in main darlingHQ. I'm having problems with crypto functions while using darling and I landend here.

@LubosD
Copy link
Member

LubosD commented Mar 20, 2021

It is included. You need to be more specific.

@paianoa paianoa changed the title ls is darling-corecrypto already included in main darlingHQ Mar 21, 2021
@paianoa
Copy link
Author

paianoa commented Mar 21, 2021

Thank you LibosD. I'm trying to generate a new keychain with the following command:

security create-keychain -p password build.keychain

Once I launch the command the following message appears instantly:

DARLING CRYPTO STUB: const struct ccmode_ecb *ccdes3_ecb_encrypt_mode(void)

I left it running for hours and then I decided to kill the execution with CTRL+C. Basically nothing happened and content of ~/Library/Keychains is the the following:

-r--r--r-- 1 root root 0 Mar 21 11:48 .flF0366243
-rw-r--r-- 1 root root 0 Mar 21 11:49 build.keychain-db
-rw-r--r-- 1 root root 0 Mar 21 11:49 build.keychain-db.amkrtempjt1OmL

3 files with 0 bytes.

I tried to build a new keychain because the system one doesn't seem to exist in darling. In fact even if the following command
security list-keychains
returns:
"/Library/Keychains/System.keychain"

the System.keychain file doesn't exist on the file system.

Is there any specific issue with keychains in darling or am I missing something about that?

Thank you.

@facekapow
Copy link
Member

Well, the "specific issue with keychains" is just that our corecrypto is not complete. As you saw above, ccdes3_ecb_encrypt_mode is a stub, but the Security framework (the one that actually deals with keychains) needs that to do something with the keychain.

In addition, the security command probably hung forever because securityd (the daemon that actually manages keychains) probably crashed after calling that stubbed function and the security command was left waiting forever for a reply from a dead daemon.

@paianoa
Copy link
Author

paianoa commented Mar 21, 2021

Thank you facekapow for the clarification.

Is there any plan to complete the corecrypto implementaton with that functionalities? I'm testing darling because the ultimate goal of the company I'm working for, is to find an alternative way to sign IPA applications without relying on a MacOS. According to what you said above I can conclude this is not possible at the moment with darling.

@bugaevc
Copy link
Member

bugaevc commented Mar 21, 2021

Are you, perhaps, looking to contribute the missing implementation? 🙂

@trungnt2910
Copy link
Contributor

Please check my PR: #9.

This replaces the stubs with proper DES functions but does not fully solve this problem yet, there seems to be some bugs related to securityd itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants