typedef void (*SSL_CTX_free_t)(SSL_CTX *);
typedef unsigned long (*ERR_get_error_t)(void);
typedef unsigned long (*OpenSSL_version_num_t)(void);
-typedef DSO * (*DSO_dsobyaddr_t)(void (*addr)(), int flags);
+typedef DSO * (*DSO_dsobyaddr_t)(void (*addr)(void), int flags);
typedef int (*DSO_free_t)(DSO *dso);
typedef enum test_types_en {
static int shlib_load(const char *filename, SHLIB *lib)
{
- *lib = dlopen(filename, RTLD_GLOBAL | RTLD_LAZY);
+ int dl_flags = (RTLD_GLOBAL|RTLD_LAZY);
+#ifdef _AIX
+ if (filename[strlen(filename) - 1] == ')')
+ dl_flags |= RTLD_MEMBER;
+#endif
+ *lib = dlopen(filename, dl_flags);
return *lib == NULL ? 0 : 1;
}
SSL_CTX_free_t mySSL_CTX_free;
ERR_get_error_t myERR_get_error;
OpenSSL_version_num_t myOpenSSL_version_num;
- DSO_dsobyaddr_t myDSO_dsobyaddr;
- DSO_free_t myDSO_free;
int result = 0;
switch (test_type) {
# define COMPATIBILITY_MASK 0xfff00000L
myOpenSSL_version_num = (OpenSSL_version_num_t)symbols[1].func;
if (!TEST_int_eq(myOpenSSL_version_num() & COMPATIBILITY_MASK,
- OPENSSL_VERSION_NUMBER & COMPATIBILITY_MASK)
+ OPENSSL_VERSION_NUMBER & COMPATIBILITY_MASK))
goto end;
if (!TEST_int_ge(myOpenSSL_version_num() & ~COMPATIBILITY_MASK,
- OPENSSL_VERSION_NUMBER & ~COMPATIBILITY_MASK)
+ OPENSSL_VERSION_NUMBER & ~COMPATIBILITY_MASK))
goto end;
if (test_type == DSO_REFTEST) {
# ifdef DSO_DLFCN
+ DSO_dsobyaddr_t myDSO_dsobyaddr;
+ DSO_free_t myDSO_free;
+
/*
* This is resembling the code used in ossl_init_base() and
* OPENSSL_atexit() to block unloading the library after dlclose().
{
DSO *hndl;
/* use known symbol from crypto module */
- if (!TEST_ptr(hndl = DSO_dsobyaddr((void (*)())ERR_get_error, 0)))
+ if (!TEST_ptr(hndl = myDSO_dsobyaddr((void (*)(void))ERR_get_error, 0)))
goto end;
- DSO_free(hndl);
+ myDSO_free(hndl);
}
# endif /* DSO_DLFCN */
}