Initialize OpenSSL within the application, not within libclamav

pull/6/head
Shawn Webb 11 years ago
parent a3962a62b5
commit bbab63daec
  1. 2
      clambc/bcrun.c
  2. 2
      clamconf/clamconf.c
  3. 4
      clamd/clamd.c
  4. 2
      clamdscan/clamdscan.c
  5. 2
      clamscan/clamscan.c
  6. 12
      libclamav/others.c
  7. 2
      sigtool/sigtool.c

@ -246,6 +246,8 @@ int main(int argc, char *argv[])
int fd = -1;
unsigned tracelevel;
cl_initialize_crypto();
if(check_flevel())
exit(1);

@ -376,6 +376,8 @@ int main(int argc, char **argv)
unsigned int i, j;
struct cli_environment env;
cl_initialize_crypto();
opts = optparse(NULL, argc, argv, 1, OPT_CLAMCONF, 0, NULL);
if(!opts) {
printf("ERROR: Can't parse command line options\n");

@ -139,10 +139,10 @@ int main(int argc, char **argv)
sa.sa_handler = SIG_IGN;
sigaction(SIGHUP, &sa, NULL);
sigaction(SIGUSR2, &sa, NULL);
#else
cl_initialize_crypto();
#endif
cl_initialize_crypto();
if((opts = optparse(NULL, argc, argv, 1, OPT_CLAMD, 0, NULL)) == NULL) {
mprintf("!Can't parse command line options\n");
return 1;

@ -69,9 +69,7 @@ int main(int argc, char **argv)
struct sigaction sigact;
#endif
#if defined(_WIN32)
cl_initialize_crypto();
#endif
if((opts = optparse(NULL, argc, argv, 1, OPT_CLAMDSCAN, OPT_CLAMSCAN, NULL)) == NULL) {
mprintf("!Can't parse command line options\n");

@ -80,9 +80,7 @@ int main(int argc, char **argv)
sigprocmask(SIG_SETMASK, &sigset, NULL);
#endif
#if defined(_WIN32)
cl_initialize_crypto();
#endif
if((opts = optparse(NULL, argc, argv, 1, OPT_CLAMSCAN, 0, NULL)) == NULL) {

@ -1312,15 +1312,3 @@ void cl_engine_set_clcb_meta(struct cl_engine *engine, clcb_meta callback)
{
engine->cb_meta = callback;
}
#if !defined(_WIN32)
__attribute__((constructor)) void init(void)
{
cl_initialize_crypto();
}
__attribute__((destructor)) void deinit(void)
{
cl_cleanup_crypto();
}
#endif

@ -2995,9 +2995,7 @@ int main(int argc, char **argv)
if(check_flevel())
exit(1);
#if defined(_WIN32)
cl_initialize_crypto();
#endif
if((ret = cl_init(CL_INIT_DEFAULT)) != CL_SUCCESS) {
mprintf("!Can't initialize libclamav: %s\n", cl_strerror(ret));

Loading…
Cancel
Save