47 |
return 0; |
return 0; |
48 |
} |
} |
49 |
|
|
|
#if 0 |
|
|
int mcrypt_modules_preopen() |
|
|
{ |
|
|
|
|
|
if (preloaded_symbols==0) { |
|
|
preloaded_symbols = 1; |
|
|
LTDL_SET_PRELOADED_SYMBOLS(); |
|
|
} |
|
|
|
|
|
return 0; |
|
|
} |
|
|
#endif |
|
|
|
|
50 |
#ifndef USE_LTDL |
#ifndef USE_LTDL |
51 |
void *mcrypt_dlopen_ext ( const char *filename) { |
void *mcrypt_dlopen_ext ( const char *filename) { |
52 |
void *ret; |
void *ret; |
53 |
char* full_path[1024]; |
char full_path[1054]; |
54 |
|
|
55 |
ret = dlopen(full_path, RTLD_LAZY); |
ret = dlopen(full_path, RTLD_LAZY); |
56 |
if (ret==NULL) { |
if (ret==NULL) { |
62 |
} |
} |
63 |
#endif |
#endif |
64 |
|
|
65 |
void *mcrypt_dlopen (const char* a_directory, const char *m_directory, const char *filename) { |
void *mcrypt_dlopen ( const char* a_directory, const char *m_directory, const char *filename) { |
66 |
void* ret=NULL; |
void* ret=NULL; |
67 |
|
|
68 |
#ifdef USE_LTDL |
#ifdef USE_LTDL |
69 |
|
char paths[1526]; |
70 |
|
|
71 |
if (a_directory != NULL) |
memset( paths, 0, 1024); |
72 |
lt_dladdsearchdir(a_directory); |
if (a_directory != NULL) { |
73 |
if (m_directory != NULL) |
strncat( paths, a_directory, 512); |
74 |
lt_dladdsearchdir(m_directory); |
strcat( paths, ":"); |
75 |
|
} |
76 |
|
if (m_directory != NULL) { |
77 |
|
strncat( paths, m_directory, 512); |
78 |
|
strcat( paths, ":"); |
79 |
|
} |
80 |
|
strncat( paths, LIBDIR, 512); |
81 |
|
|
82 |
|
lt_dlsetsearchpath(paths); |
83 |
|
|
|
if (a_directory==NULL && m_directory==NULL) lt_dladdsearchdir(LIBDIR); |
|
84 |
ret = lt_dlopenext(filename); |
ret = lt_dlopenext(filename); |
|
|
|
85 |
if (ret==NULL) ret = lt_dlopen(filename); |
if (ret==NULL) ret = lt_dlopen(filename); |
86 |
|
|
87 |
return ret; |
return ret; |
88 |
|
|
89 |
#else |
#else |
90 |
char* full_path[1050]; |
char full_path[1050]; |
91 |
|
|
92 |
if (a_directory!=NULL) { |
if (a_directory!=NULL) { |
93 |
strncpy(full_path, a_directory, 512); |
strncpy(full_path, a_directory, 512); |
112 |
char *a_directory, char *mode, char *m_directory) |
char *a_directory, char *mode, char *m_directory) |
113 |
{ |
{ |
114 |
MCRYPT td; |
MCRYPT td; |
|
char* tmpchar; |
|
115 |
|
|
116 |
td = calloc(1, sizeof(CRYPT_STREAM)); |
td = calloc(1, sizeof(CRYPT_STREAM)); |
117 |
|
|
463 |
{ |
{ |
464 |
int i; |
int i; |
465 |
lt_dlhandle *_handle; |
lt_dlhandle *_handle; |
|
char* tmpchar; |
|
466 |
int (*_self_test) (void); |
int (*_self_test) (void); |
467 |
|
|
468 |
|
|
493 |
{ |
{ |
494 |
int i; |
int i; |
495 |
lt_dlhandle _handle; |
lt_dlhandle _handle; |
|
char* tmpchar; |
|
496 |
int (*_version) (void); |
int (*_version) (void); |
497 |
|
|
498 |
if (lt_dlinit() != 0) { |
if (lt_dlinit() != 0) { |
521 |
{ |
{ |
522 |
int i; |
int i; |
523 |
lt_dlhandle *_handle; |
lt_dlhandle *_handle; |
|
char* tmpchar; |
|
524 |
int (*_version) (void); |
int (*_version) (void); |
525 |
|
|
526 |
if (lt_dlinit() != 0) { |
if (lt_dlinit() != 0) { |
550 |
{ |
{ |
551 |
int i; |
int i; |
552 |
lt_dlhandle _handle; |
lt_dlhandle _handle; |
|
char* tmpchar; |
|
553 |
int (*_is_block_algorithm) (void); |
int (*_is_block_algorithm) (void); |
554 |
|
|
555 |
if (lt_dlinit() != 0) { |
if (lt_dlinit() != 0) { |
580 |
{ |
{ |
581 |
int i; |
int i; |
582 |
lt_dlhandle *_handle; |
lt_dlhandle *_handle; |
|
char* tmpchar; |
|
583 |
int (*_is_a_block_mode) (void); |
int (*_is_a_block_mode) (void); |
584 |
|
|
585 |
if (lt_dlinit() != 0) { |
if (lt_dlinit() != 0) { |
609 |
{ |
{ |
610 |
int i; |
int i; |
611 |
lt_dlhandle *_handle; |
lt_dlhandle *_handle; |
|
char* tmpchar; |
|
612 |
int (*_is_block_mode) (void); |
int (*_is_block_mode) (void); |
613 |
|
|
614 |
|
|
638 |
{ |
{ |
639 |
int i; |
int i; |
640 |
lt_dlhandle _handle; |
lt_dlhandle _handle; |
|
char* tmpchar; |
|
641 |
int (*_get_block_size) (void); |
int (*_get_block_size) (void); |
642 |
|
|
643 |
if (lt_dlinit() != 0) { |
if (lt_dlinit() != 0) { |
666 |
{ |
{ |
667 |
int i; |
int i; |
668 |
lt_dlhandle _handle; |
lt_dlhandle _handle; |
|
char* tmpchar; |
|
669 |
int (*_get_key_size) (void); |
int (*_get_key_size) (void); |
670 |
|
|
671 |
if (lt_dlinit() != 0) { |
if (lt_dlinit() != 0) { |
698 |
lt_dlhandle _handle; |
lt_dlhandle _handle; |
699 |
int *(*_mcrypt_get_key_sizes) (int *); |
int *(*_mcrypt_get_key_sizes) (int *); |
700 |
int *size; |
int *size; |
|
char* tmpchar; |
|
701 |
|
|
702 |
if (lt_dlinit() != 0) { |
if (lt_dlinit() != 0) { |
703 |
*len = 0; |
*len = 0; |