| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
$ cat foobar.cpp #include <openssl/dh.h> #include <openssl/asn1.h> #include <openssl/bn.h> #include <cstdio> #include <dlfcn.h>
DH *dh2 = DHparams_dup(dh);
dlclose(handle);
return 0;
}
$ make foo bar baz
g++ -o foo -lcrypto foobar.cpp
g++ -flat_namespace -undefined suppress -bind_at_load \
-o bar foobar.cpp
MACOSX_DEPLOYMENT_TARGET=10.3 g++ -undefined dynamic_lookup \
-bind_at_load -o baz foobar.cpp
$ ./foo
$ ./bar
dyld: Symbol not found: _d2i_DHparams
Referenced from: /Users/steve/temp/dlopen/./bar
Expected in: flat namespaceTrace/BPT trap $ ./baz dyld: Symbol not found: _d2i_DHparams Referenced from: /Users/steve/temp/dlopen/./baz Expected in: dynamic lookup
Trace/BPT trap
$ cat hash.cpp #include <openssl/sha.h> #include <cstdio> #include <cstring> #include <dlfcn.h>
puts(hello);
SHA1((unsigned char *)hello, strlen(hello), md); for(int i = 0; i < SHA_DIGEST_LENGTH; ++i)
printf("%02hhx", md[i]);
puts("");
dlclose(handle);
return 0;
}
$ make hash
g++ -flat_namespace -undefined suppress -bind_at_load \
-o hash hash.cpp
$ ./hash
Hello World!
2ef7bde608ce5404e97d5f042f95f89f1c232871- Steve
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.