]>
Commit | Line | Data |
---|---|---|
2fd3f4e8 A |
1 | #include <stdio.h> |
2 | #include <stdlib.h> | |
3 | #include <dlfcn.h> | |
4 | #include <unistd.h> | |
5 | #include <stdlib.h> | |
6 | #include <string.h> | |
7 | ||
8 | ||
9 | #include "test.h" | |
10 | ||
11 | ||
12 | int main() | |
13 | { | |
14 | void* handle = dlopen("libfoo.dylib", RTLD_LAZY); | |
15 | if ( handle != NULL ) { | |
16 | FAIL("dlopen-codesign: load of libfoo.dylib should have failed"); | |
17 | return EXIT_SUCCESS; | |
18 | } | |
19 | const char* msg = dlerror(); | |
20 | if ( strstr(msg, "signature") == NULL ) { | |
21 | FAIL("dlopen-codesign: load of libfoo.dylib failed, but message was wrong: %s", msg); | |
22 | return EXIT_SUCCESS; | |
23 | } | |
24 | ||
25 | PASS("dlopen-codesign"); | |
26 | return EXIT_SUCCESS; | |
27 | } |