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

Not working in macOS Big Sur. 7 errors in keychaindump.c #14

Open
abhishek-bodapati opened this issue May 18, 2021 · 1 comment
Open

Comments

@abhishek-bodapati
Copy link

keychaindump.c:209:27: error: expected expression
    DES_set_key((C_Block *)ckey1, &ks1);
                          ^
keychaindump.c:209:18: error: use of undeclared identifier 'C_Block'; did you mean 'clock'?
    DES_set_key((C_Block *)ckey1, &ks1);
                 ^~~~~~~
                 clock
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:109:9: note: 'clock' declared here
clock_t clock(void) __DARWIN_ALIAS(clock);
        ^
keychaindump.c:210:27: error: expected expression
    DES_set_key((C_Block *)ckey2, &ks2);
                          ^
keychaindump.c:210:18: error: use of undeclared identifier 'C_Block'; did you mean 'clock'?
    DES_set_key((C_Block *)ckey2, &ks2);
                 ^~~~~~~
                 clock
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:109:9: note: 'clock' declared here
clock_t clock(void) __DARWIN_ALIAS(clock);
        ^
keychaindump.c:211:27: error: expected expression
    DES_set_key((C_Block *)ckey3, &ks3);
                          ^
keychaindump.c:211:18: error: use of undeclared identifier 'C_Block'; did you mean 'clock'?
    DES_set_key((C_Block *)ckey3, &ks3);
                 ^~~~~~~
                 clock
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:109:9: note: 'clock' declared here
clock_t clock(void) __DARWIN_ALIAS(clock);
        ^
keychaindump.c:449:9: error: implicit declaration of function 'geteuid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (geteuid()) {
        ^
keychaindump.c:449:9: note: did you mean 'getauid'?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/bsm/audit.h:353:9: note: 'getauid' declared here
int     getauid(au_id_t *);
        ^
keychaindump.c:490:21: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if (key_len = dump_wrapping_key(key, g_master_candidates[i], buffer, sz)) {
            ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
keychaindump.c:490:21: note: place parentheses around the assignment to silence this warning
        if (key_len = dump_wrapping_key(key, g_master_candidates[i], buffer, sz)) {
                    ^
            (                                                                   )
keychaindump.c:490:21: note: use '==' to turn this assignment into an equality comparison
        if (key_len = dump_wrapping_key(key, g_master_candidates[i], buffer, sz)) {
                    ^
                    ==
1 warning and 7 errors generated.
@xorcare
Copy link

xorcare commented Jun 15, 2021

A similar problem:

xor at ant in /var/folders/g4/kq_rtk_j64z3xhpy0q8pftl40000gn/T/tmp.hGNY3u47/keychaindump on  master 
❯ gcc keychaindump.c -o keychaindump -lcrypto
keychaindump.c:12:10: fatal error: 'openssl/des.h' file not found
#include <openssl/des.h>
         ^~~~~~~~~~~~~~~
1 error generated.

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

2 participants