-
Notifications
You must be signed in to change notification settings - Fork 129
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
Will not compile on El Capitan #10
Comments
Same problem running on macOS Sierra. |
Same here |
This worked: brew install openssl |
the same works with macports: |
Not building here using any of the above methods. For example: working from @henno's comment: keychaindump.c:449:9: warning: implicit declaration of function 'geteuid' is invalid in C99 [-Wimplicit-function-declaration]
if (geteuid()) {
^
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)) {
^
==
2 warnings generated.
ld: library not found for -lcrypto |
I get the above error too, any ideas? |
Assuming you have used home-brew to install openssl, if you run ➜ Downloads brew link openssl
Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib So the correct command (for now) is Related: Homebrew/brew#612 |
Had the same issue, but after executing brew reinstall SSL, brew gave me the following path for openssl : /usr/local/Cellar/openssl/ So using the right path would give : gcc keychaindump.c -o keychaindump -lcrypto -I /usr/local/Cellar/openssl/1.0.2q/include -L /usr/local/Cellar/openssl/1.0.2q/lib 1.0.2q may be another version depending on your system. Worked with 2 warnings; Hope this will help |
@mrRobotSAS I went ahead and fixed those warnings in #11 |
I needed to apply the following diff to get it to compile for me with home-brew's openssl.
|
@JonathanAnderson 's solution worked on Big Sur However, no bueno. Looks like Apple finally fixed the issue that allowed this tool to work. |
$ 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.
The text was updated successfully, but these errors were encountered: