Migrate ClamAV's crypto routines over to OpenSSL.

0.98.2
Shawn Webb 11 years ago
commit b842e8bf75
  1. 70
      Makefile.in
  2. 44
      clamav-config.h.in
  3. 70
      clamav-milter/Makefile.in
  4. 70
      clambc/Makefile.in
  5. 5
      clambc/bcrun.c
  6. 70
      clamconf/Makefile.in
  7. 4
      clamconf/clamconf.c
  8. 70
      clamd/Makefile.in
  9. 4
      clamd/clamd.c
  10. 5
      clamd/fan.c
  11. 4
      clamd/others.c
  12. 4
      clamd/scanner.c
  13. 4
      clamd/server-th.c
  14. 4
      clamd/session.c
  15. 4
      clamd/thrmgr.c
  16. 70
      clamdscan/Makefile.in
  17. 4
      clamdscan/client.c
  18. 4
      clamdscan/proto.c
  19. 70
      clamdtop/Makefile.in
  20. 70
      clamscan/Makefile.in
  21. 4
      clamscan/clamscan.c
  22. 4
      clamscan/manager.c
  23. 70
      clamsubmit/Makefile.in
  24. 4
      clamsubmit/clamsubmit.c
  25. 29792
      configure
  26. 1773
      configure.ac
  27. 70
      database/Makefile.in
  28. 70
      docs/Makefile.in
  29. 70
      etc/Makefile.in
  30. 70
      freshclam/Makefile.in
  31. 4
      freshclam/freshclam.c
  32. 5
      freshclam/manager.c
  33. 5
      libclamav/7z/7zAlloc.c
  34. 6
      libclamav/7z/7zBuf2.c
  35. 9
      libclamav/7z/7zCrc.c
  36. 9
      libclamav/7z/7zCrcOpt.c
  37. 9
      libclamav/7z/7zDec.c
  38. 9
      libclamav/7z/7zIn.c
  39. 9
      libclamav/7z/CpuArch.c
  40. 4
      libclamav/7z/Ppmd7.c
  41. 4
      libclamav/7z/Ppmd7Dec.c
  42. 35
      libclamav/7z/Sha256.h
  43. 16
      libclamav/7z/Xz.c
  44. 8
      libclamav/7z/Xz.h
  45. 23
      libclamav/7z/XzDec.c
  46. 9
      libclamav/7z/XzIn.c
  47. 8
      libclamav/7z_iface.c
  48. 24
      libclamav/Makefile.am
  49. 176
      libclamav/Makefile.in
  50. 4
      libclamav/adc.c
  51. 58
      libclamav/asn1.c
  52. 5
      libclamav/aspack.c
  53. 4
      libclamav/autoit.c
  54. 4
      libclamav/binhex.c
  55. 4
      libclamav/blob.c
  56. 7
      libclamav/bytecode.c
  57. 5
      libclamav/bytecode_api.c
  58. 5
      libclamav/bytecode_detect.c
  59. 5
      libclamav/bytecode_nojit.c
  60. 5
      libclamav/bytecode_vm.c
  61. 19
      libclamav/c++/bytecode2llvm.cpp
  62. 4
      libclamav/cab.c
  63. 38
      libclamav/cache.c
  64. 4
      libclamav/chmunpack.c
  65. 189
      libclamav/conv.c
  66. 27
      libclamav/conv.h
  67. 4
      libclamav/cpio.c
  68. 4
      libclamav/crtmgr.c
  69. 1
      libclamav/crtmgr.h
  70. 958
      libclamav/crypto.c
  71. 277
      libclamav/crypto.h
  72. 24
      libclamav/cvd.c
  73. 4
      libclamav/cvd.h
  74. 4
      libclamav/dconf.c
  75. 4
      libclamav/disasm.c
  76. 4
      libclamav/dlp.c
  77. 4
      libclamav/dmg.c
  78. 25
      libclamav/dsig.c
  79. 4
      libclamav/elf.c
  80. 4
      libclamav/entconv.c
  81. 12
      libclamav/events.c
  82. 4
      libclamav/explode.c
  83. 4
      libclamav/filetypes.c
  84. 5
      libclamav/filtering.c
  85. 4
      libclamav/fmap.c
  86. 4
      libclamav/fpu.c
  87. 4
      libclamav/fsg.c
  88. 4
      libclamav/gpt.c
  89. 4
      libclamav/hashtab.c
  90. 4
      libclamav/hfsplus.c
  91. 14
      libclamav/hostid.c
  92. 4
      libclamav/htmlnorm.c
  93. 4
      libclamav/inflate64.c
  94. 4
      libclamav/is_tar.c
  95. 4
      libclamav/ishield.c
  96. 5
      libclamav/iso9660.c
  97. 4
      libclamav/jpeg.c
  98. 9
      libclamav/json.c
  99. 4
      libclamav/jsparse/js-norm.c
  100. 36
      libclamav/libclamav.map
  101. Some files were not shown because too many files have changed in this diff Show More

@ -103,6 +103,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -234,9 +288,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -256,6 +322,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -277,8 +344,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -316,6 +385,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -178,9 +178,6 @@
/* Define to 1 if the system has the type `error_t'. */
#undef HAVE_ERROR_T
/* Define to 1 if you have the <fcntl.h> header file */
#undef HAVE_FCNTL_H
/* have working file descriptor passing support */
#undef HAVE_FD_PASSING
@ -190,9 +187,6 @@
/* have getaddrinfo() */
#undef HAVE_GETADDRINFO
/* Define to 1 if you have the `getifaddrs' function. */
#undef HAVE_GETIFADDRS
/* Define to 1 if getpagesize() is available */
#undef HAVE_GETPAGESIZE
@ -275,9 +269,6 @@
/* Define to 1 if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define to 1 if you have the <net/if_dl.h> header file */
#undef HAVE_NET_IF_DL_H
/* Define to 1 if you have the `opendir' function. */
#undef HAVE_OPENDIR
@ -374,9 +365,6 @@
/* Define to 1 if sysconf(_SC_PAGESIZE) is available */
#undef HAVE_SYSCONF_SC_PAGESIZE
/* Define to 1 if you have the `sysctlbyname' function. */
#undef HAVE_SYSCTLBYNAME
/* Define to 1 if you have the <sys/dl.h> header file. */
#undef HAVE_SYS_DL_H
@ -526,6 +514,28 @@
/* use syslog */
#undef USE_SYSLOG
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Version number of package */
#undef VERSION
@ -547,9 +557,19 @@
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* POSIX compatibility */
#undef _POSIX_PII_SOCKET
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* thread safe */
#undef _REENTRANT

@ -85,6 +85,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -200,9 +254,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -222,6 +288,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -243,8 +310,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -282,6 +351,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -66,6 +66,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -136,9 +190,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -158,6 +224,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -179,8 +246,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -218,6 +287,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -27,6 +27,11 @@
#include <sys/time.h>
#endif
#include <stdlib.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "bytecode.h"
#include "bytecode_priv.h"
#include "clamav.h"

@ -84,6 +84,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -154,9 +208,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -176,6 +242,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -197,8 +264,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -236,6 +305,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -35,6 +35,10 @@
#include <sys/stat.h>
#include <dirent.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "shared/optparser.h"
#include "shared/misc.h"

@ -84,6 +84,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -167,9 +221,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -189,6 +255,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -210,8 +277,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -249,6 +318,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -53,6 +53,10 @@
#include <sys/resource.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "target.h"
#include "libclamav/clamav.h"

@ -35,6 +35,11 @@
#include <errno.h>
#include <sys/fanotify.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "fan.h"
#include "libclamav/clamav.h"

@ -65,6 +65,10 @@
#endif /* HAVE_POLL_H */
#endif /* HAVE_POLL */
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include <limits.h>
#include "shared/optparser.h"
#include "shared/output.h"

@ -49,6 +49,10 @@
#include <stddef.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "libclamav/clamav.h"
#include "libclamav/others.h"
#include "libclamav/scanners.h"

@ -40,6 +40,10 @@
#include <unistd.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include <fcntl.h>
#ifdef C_SOLARIS
#include <stdio_ext.h>

@ -49,6 +49,10 @@
#include <stddef.h>
#include <limits.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "libclamav/clamav.h"
#include "libclamav/str.h"
#include "libclamav/others.h"

@ -29,6 +29,10 @@
#include <errno.h>
#include <string.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "shared/output.h"
#include "thrmgr.h"

@ -84,6 +84,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -165,9 +219,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -187,6 +253,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -208,8 +275,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -247,6 +316,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -52,6 +52,10 @@
#include <sys/uio.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "shared/optparser.h"
#include "shared/output.h"
#include "shared/misc.h"

@ -43,6 +43,10 @@
#include <sys/socket.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "libclamav/others.h"
#include "shared/actions.h"
#include "shared/output.h"

@ -66,6 +66,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -171,9 +225,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -193,6 +259,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -214,8 +281,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -253,6 +322,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -85,6 +85,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -156,9 +210,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -178,6 +244,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -199,8 +266,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -238,6 +307,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -38,6 +38,10 @@
#include <sys/resource.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "others.h"
#include "global.h"
#include "manager.h"

@ -48,6 +48,10 @@
#include <errno.h>
#include <target.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "manager.h"
#include "global.h"

@ -84,6 +84,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -154,9 +208,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -176,6 +242,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -197,8 +264,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -236,6 +305,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -3,6 +3,10 @@
#include <unistd.h>
#include <string.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include <curl/curl.h>
#include "libclamav/clamav.h"

29792
configure vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -83,6 +83,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -122,9 +176,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -144,6 +210,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -165,8 +232,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -204,6 +273,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -82,6 +82,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -155,9 +209,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -177,6 +243,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -198,8 +265,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -237,6 +306,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -84,6 +84,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -152,9 +206,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -174,6 +240,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -195,8 +262,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -234,6 +303,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -85,6 +85,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -158,9 +212,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -180,6 +246,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -201,8 +268,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -240,6 +309,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@

@ -46,6 +46,10 @@
#include <syslog.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "target.h"
#include "clamav.h"
#include "freshclamcodes.h"

@ -30,7 +30,6 @@
* fails on Solaris because it would require a c99 compiler,
* 500 fails completely on Solaris, and FreeBSD, and w/o _XOPEN_SOURCE
* strptime is not defined on Linux */
#define _GNU_SOURCE
#define __EXTENSIONS
#include <stdio.h>
@ -61,6 +60,10 @@
#include <errno.h>
#include <zlib.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "target.h"
#include "freshclamcodes.h"

@ -3,6 +3,11 @@
#include "7zAlloc.h"
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
/* #define _SZ_ALLOC_DEBUG */
/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */

@ -2,6 +2,12 @@
2008-10-04 : Igor Pavlov : Public domain */
#include <string.h>
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
#include "7zBuf.h"
void DynBuf_Construct(CDynBuf *p)

@ -1,6 +1,15 @@
/* 7zCrc.c -- CRC32 calculation
2009-11-23 : Igor Pavlov : Public domain */
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "7zCrc.h"
#include "CpuArch.h"

@ -1,6 +1,15 @@
/* 7zCrcOpt.c -- CRC32 calculation : optimized version
2009-11-23 : Igor Pavlov : Public domain */
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "CpuArch.h"
#ifdef MY_CPU_LE

@ -3,6 +3,15 @@
#include <string.h>
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#define _7ZIP_PPMD_SUPPPORT
#include "7z.h"

@ -3,6 +3,15 @@
#include <string.h>
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "7z.h"
#include "7zCrc.h"
#include "CpuArch.h"

@ -1,6 +1,15 @@
/* CpuArch.c -- CPU specific code
2010-10-26: Igor Pavlov : Public domain */
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "CpuArch.h"
#ifdef MY_CPU_X86_OR_AMD64

@ -4,6 +4,10 @@ This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */
#include <memory.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "Ppmd7.h"
const Byte PPMD7_kExpEscape[16] = { 25, 14, 9, 7, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2 };

@ -2,6 +2,10 @@
2010-03-12 : Igor Pavlov : Public domain
This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "Ppmd7.h"
#define kTopValue (1 << 24)

@ -1,35 +0,0 @@
/* Sha256.h -- SHA-256 Hash
2010-06-11 : Igor Pavlov : Public domain */
#ifndef __CRYPTO_SHA256_H
#define __CRYPTO_SHA256_H
#include "Types.h"
EXTERN_C_BEGIN
#define SHA256_DIGEST_SIZE 32
#define __USE_CLAM_SHA256_FOR_7Z__
#ifndef __USE_CLAM_SHA256_FOR_7Z__
typedef struct
{
UInt32 state[8];
UInt64 count;
Byte buffer[64];
} CSha256;
void Sha256_Init(CSha256 *p);
void Sha256_Update(CSha256 *p, const Byte *data, size_t size);
void Sha256_Final(CSha256 *p, Byte *digest);
#else
#include "../sha256.h"
#define CSha256 SHA256_CTX
#define Sha256_Init sha256_init
#define Sha256_Update sha256_update
#define Sha256_Final sha256_final
#endif
EXTERN_C_END
#endif

@ -1,6 +1,15 @@
/* Xz.c - Xz
2009-04-15 : Igor Pavlov : Public domain */
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "7zCrc.h"
#include "CpuArch.h"
#include "Xz.h"
@ -49,7 +58,7 @@ void XzCheck_Init(CXzCheck *p, int mode)
{
case XZ_CHECK_CRC32: p->crc = CRC_INIT_VAL; break;
case XZ_CHECK_CRC64: p->crc64 = CRC64_INIT_VAL; break;
case XZ_CHECK_SHA256: Sha256_Init(&p->sha); break;
case XZ_CHECK_SHA256: EVP_DigestInit(&p->sha, EVP_sha256()); break;
}
}
@ -59,7 +68,7 @@ void XzCheck_Update(CXzCheck *p, const void *data, size_t size)
{
case XZ_CHECK_CRC32: p->crc = CrcUpdate(p->crc, data, size); break;
case XZ_CHECK_CRC64: p->crc64 = Crc64Update(p->crc64, data, size); break;
case XZ_CHECK_SHA256: Sha256_Update(&p->sha, (const Byte *)data, size); break;
case XZ_CHECK_SHA256: EVP_DigestUpdate(&p->sha, (const Byte *)data, size); break;
}
}
@ -79,7 +88,8 @@ int XzCheck_Final(CXzCheck *p, Byte *digest)
break;
}
case XZ_CHECK_SHA256:
Sha256_Final(&p->sha, digest);
EVP_DigestFinal(&p->sha, digest, NULL);
EVP_MD_CTX_cleanup(&(p->sha));
break;
default:
return 0;

@ -4,7 +4,9 @@
#ifndef __XZ_H
#define __XZ_H
#include "Sha256.h"
#include "Types.h"
#define SHA256_DIGEST_SIZE 32
EXTERN_C_BEGIN
@ -79,7 +81,7 @@ typedef struct
int mode;
UInt32 crc;
UInt64 crc64;
CSha256 sha;
EVP_MD_CTX sha;
} CXzCheck;
void XzCheck_Init(CXzCheck *p, int mode);
@ -215,7 +217,7 @@ typedef struct
CMixCoder decoder;
CXzBlock block;
CXzCheck check;
CSha256 sha;
EVP_MD_CTX sha;
Byte shaDigest[SHA256_DIGEST_SIZE];
Byte buf[XZ_BLOCK_HEADER_SIZE_MAX];
} CXzUnpacker;

@ -10,6 +10,15 @@
#include <stdlib.h>
#include <string.h>
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "7zCrc.h"
#include "Alloc.h"
#include "Bra.h"
@ -642,7 +651,7 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
Byte temp[32];
unsigned num = Xz_WriteVarInt(temp, p->packSize + p->blockHeaderSize + XzFlags_GetCheckSize(p->streamFlags));
num += Xz_WriteVarInt(temp + num, p->unpackSize);
Sha256_Update(&p->sha, temp, num);
EVP_DigestUpdate(&p->sha, temp, num);
p->indexSize += num;
p->numBlocks++;
@ -677,7 +686,7 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
{
RINOK(Xz_ParseHeader(&p->streamFlags, p->buf));
p->state = XZ_STATE_BLOCK_HEADER;
Sha256_Init(&p->sha);
EVP_DigestInit(&p->sha, EVP_sha256());
p->indexSize = 0;
p->numBlocks = 0;
p->pos = 0;
@ -696,8 +705,9 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
p->indexPreSize = 1 + Xz_WriteVarInt(p->buf + 1, p->numBlocks);
p->indexPos = p->indexPreSize;
p->indexSize += p->indexPreSize;
Sha256_Final(&p->sha, p->shaDigest);
Sha256_Init(&p->sha);
EVP_DigestFinal(&p->sha, p->shaDigest, NULL);
EVP_MD_CTX_cleanup(&p->sha);
EVP_DigestInit(&p->sha, EVP_sha256());
p->crc = CrcUpdate(CRC_INIT_VAL, p->buf, p->indexPreSize);
p->state = XZ_STATE_STREAM_INDEX;
}
@ -775,7 +785,7 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
if (srcRem > cur)
srcRem = (SizeT)cur;
p->crc = CrcUpdate(p->crc, src, srcRem);
Sha256_Update(&p->sha, src, srcRem);
EVP_DigestUpdate(&p->sha, src, srcRem);
(*srcLen) += srcRem;
src += srcRem;
p->indexPos += srcRem;
@ -796,7 +806,8 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
p->state = XZ_STATE_STREAM_INDEX_CRC;
p->indexSize += 4;
p->pos = 0;
Sha256_Final(&p->sha, digest);
EVP_DigestFinal(&p->sha, digest, NULL);
EVP_MD_CTX_cleanup(&p->sha);
if (memcmp(digest, p->shaDigest, SHA256_DIGEST_SIZE) != 0)
return SZ_ERROR_CRC;
}

@ -3,6 +3,15 @@
#include <string.h>
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "7zCrc.h"
#include "CpuArch.h"
#include "Xz.h"

@ -18,6 +18,14 @@
* MA 02110-1301, USA.
*/
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "7z_iface.h"
#include "lzma_iface.h"

@ -73,10 +73,13 @@ endif
libclamav_internal_utils_la_SOURCES=str.c\
str.h\
conv.c \
conv.h \
crypto.c \
crypto.h \
clamav.h \
iowrap.c \
iowrap.h \
md5.c\
md5.h\
others_common.c \
others.h \
qsort.c \
@ -91,15 +94,18 @@ libclamav_internal_utils_la_SOURCES=str.c\
regex/regex2.h \
regex/utils.h
libclamav_internal_utils_la_LDFLAGS=-static
libclamav_internal_utils_la_LDFLAGS=-static @LIBCLAMAV_LIBS@
libclamav_internal_utils_la_CFLAGS=$(AM_CFLAGS) -fPIC -DPIC
libclamav_internal_utils_nothreads_la_SOURCES=str.c\
conv.c \
conv.h \
crypto.c \
crypto.h \
clamav.h \
str.h\
iowrap.c \
iowrap.h \
md5.c\
md5.h\
others_common.c \
others.h \
qsort.c \
@ -114,7 +120,7 @@ libclamav_internal_utils_nothreads_la_SOURCES=str.c\
regex/regex2.h \
regex/utils.h
libclamav_internal_utils_nothreads_la_LDFLAGS=-static
libclamav_internal_utils_nothreads_la_LDFLAGS=-static @LIBCLAMAV_LIBS@
libclamav_internal_utils_nothreads_la_CFLAGS=$(AM_CFLAGS) -DCL_NOTHREADS
if ENABLE_LLVM
@ -143,7 +149,6 @@ endif
include_HEADERS = clamav.h
libclamav_la_SOURCES = \
clamav.h \
matcher-ac.c \
matcher-ac.h \
matcher-bm.c \
@ -325,7 +330,6 @@ libclamav_la_SOURCES = \
7z/XzCrc64.h \
7z/XzDec.c \
7z/XzIn.c \
7z/Sha256.h \
7z/Delta.c \
7z/Delta.h \
7z/Alloc.h \
@ -357,10 +361,6 @@ libclamav_la_SOURCES = \
perflogging.c\
perflogging.h\
default.h\
sha256.c\
sha256.h\
sha1.c\
sha1.h\
bytecode.c\
bytecode.h\
bytecode_vm.c\

@ -95,6 +95,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
$(top_srcdir)/m4/reorganization/version.m4 \
$(top_srcdir)/m4/reorganization/build_tools.m4 \
$(top_srcdir)/m4/reorganization/headers.m4 \
$(top_srcdir)/m4/reorganization/c_options.m4 \
$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
$(top_srcdir)/m4/reorganization/linker_checks.m4 \
$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
$(top_srcdir)/m4/reorganization/libs/libz.m4 \
$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
$(top_srcdir)/m4/reorganization/milter/enable.m4 \
$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
$(top_srcdir)/m4/reorganization/usergroup.m4 \
$(top_srcdir)/m4/reorganization/debug.m4 \
$(top_srcdir)/m4/reorganization/customversion.m4 \
$(top_srcdir)/m4/reorganization/nocache.m4 \
$(top_srcdir)/m4/reorganization/dns.m4 \
$(top_srcdir)/m4/reorganization/bigstack.m4 \
$(top_srcdir)/m4/reorganization/dbdir.m4 \
$(top_srcdir)/m4/reorganization/cfgdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
$(top_srcdir)/m4/reorganization/os_checks.m4 \
$(top_srcdir)/m4/reorganization/milter/check.m4 \
$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
$(top_srcdir)/m4/reorganization/clamav_user.m4 \
$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
$(top_srcdir)/m4/reorganization/clamdtop.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/libs/xml.m4 \
$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@ -183,7 +237,6 @@ am_libclamav_la_OBJECTS = libclamav_la-matcher-ac.lo \
libclamav_la-uniq.lo libclamav_la-version.lo \
libclamav_la-mpool.lo libclamav_la-filtering.lo \
libclamav_la-fmap.lo libclamav_la-perflogging.lo \
libclamav_la-sha256.lo libclamav_la-sha1.lo \
libclamav_la-bytecode.lo libclamav_la-bytecode_vm.lo \
libclamav_la-cpio.lo libclamav_la-macho.lo \
libclamav_la-ishield.lo libclamav_la-bytecode_api.lo \
@ -259,8 +312,9 @@ libclamav_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
libclamav_internal_utils_la_LIBADD =
am_libclamav_internal_utils_la_OBJECTS = \
libclamav_internal_utils_la-str.lo \
libclamav_internal_utils_la-conv.lo \
libclamav_internal_utils_la-crypto.lo \
libclamav_internal_utils_la-iowrap.lo \
libclamav_internal_utils_la-md5.lo \
libclamav_internal_utils_la-others_common.lo \
libclamav_internal_utils_la-qsort.lo \
libclamav_internal_utils_la-strlcpy.lo \
@ -277,8 +331,9 @@ libclamav_internal_utils_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
libclamav_internal_utils_nothreads_la_LIBADD =
am_libclamav_internal_utils_nothreads_la_OBJECTS = \
libclamav_internal_utils_nothreads_la-str.lo \
libclamav_internal_utils_nothreads_la-conv.lo \
libclamav_internal_utils_nothreads_la-crypto.lo \
libclamav_internal_utils_nothreads_la-iowrap.lo \
libclamav_internal_utils_nothreads_la-md5.lo \
libclamav_internal_utils_nothreads_la-others_common.lo \
libclamav_internal_utils_nothreads_la-qsort.lo \
libclamav_internal_utils_nothreads_la-strlcpy.lo \
@ -429,9 +484,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CLAMAVGROUP = @CLAMAVGROUP@
CLAMAVUSER = @CLAMAVUSER@
CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
CLAMBC_LIBS = @CLAMBC_LIBS@
CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
CLAMD_LIBS = @CLAMD_LIBS@
CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
CLAMMEM_LIBS = @CLAMMEM_LIBS@
CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
CPP = @CPP@
@ -451,6 +518,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GCOV = @GCOV@
GENHTML = @GENHTML@
@ -472,8 +540,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
LIBLTDL = @LIBLTDL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
@ -511,6 +581,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
TH_SAFE = @TH_SAFE@
@ -624,10 +695,13 @@ EXTRA_DIST = c++/Makefile.nollvm.in $(am__append_4) regex/engine.c \
@ENABLE_UNRAR_TRUE@IFACEDEP = libclamunrar_iface.la
libclamav_internal_utils_la_SOURCES = str.c\
str.h\
conv.c \
conv.h \
crypto.c \
crypto.h \
clamav.h \
iowrap.c \
iowrap.h \
md5.c\
md5.h\
others_common.c \
others.h \
qsort.c \
@ -642,14 +716,17 @@ libclamav_internal_utils_la_SOURCES = str.c\
regex/regex2.h \
regex/utils.h
libclamav_internal_utils_la_LDFLAGS = -static
libclamav_internal_utils_la_LDFLAGS = -static @LIBCLAMAV_LIBS@
libclamav_internal_utils_la_CFLAGS = $(AM_CFLAGS) -fPIC -DPIC
libclamav_internal_utils_nothreads_la_SOURCES = str.c\
conv.c \
conv.h \
crypto.c \
crypto.h \
clamav.h \
str.h\
iowrap.c \
iowrap.h \
md5.c\
md5.h\
others_common.c \
others.h \
qsort.c \
@ -664,7 +741,7 @@ libclamav_internal_utils_nothreads_la_SOURCES = str.c\
regex/regex2.h \
regex/utils.h
libclamav_internal_utils_nothreads_la_LDFLAGS = -static
libclamav_internal_utils_nothreads_la_LDFLAGS = -static @LIBCLAMAV_LIBS@
libclamav_internal_utils_nothreads_la_CFLAGS = $(AM_CFLAGS) -DCL_NOTHREADS
@ENABLE_LLVM_FALSE@LLVMLIBADD = libclamav_nocxx.la
@ENABLE_LLVM_TRUE@LLVMLIBADD = c++/libclamavcxx.la -lstdc++ -lm
@ -678,7 +755,7 @@ libclamav_la_CFLAGS = $(AM_CFLAGS) $(XML_CPPFLAGS) -DSEARCH_LIBDIR=\"$(libdir)\"
libclamav_la_LDFLAGS = @TH_SAFE@ $(XML_LIBS) -version-info \
@LIBCLAMAV_VERSION@ -no-undefined $(am__append_6)
include_HEADERS = clamav.h
libclamav_la_SOURCES = clamav.h matcher-ac.c matcher-ac.h matcher-bm.c \
libclamav_la_SOURCES = matcher-ac.c matcher-ac.h matcher-bm.c \
matcher-bm.h matcher-hash.c matcher-hash.h matcher.c matcher.h \
others.c others.h readdb.c readdb.h cvd.c cvd.h dsig.c dsig.h \
scanners.c scanners.h textdet.c textdet.h filetypes.c \
@ -711,14 +788,13 @@ libclamav_la_SOURCES = clamav.h matcher-ac.c matcher-ac.h matcher-bm.c \
7z/Bra.c 7z/Bra.h 7z/Bra86.c 7z/CpuArch.h 7z/Lzma2Dec.c \
7z/Lzma2Dec.h 7z/LzmaDec.c 7z/LzmaDec.h 7z/Ppmd.h 7z/Ppmd7.c \
7z/Ppmd7.h 7z/Ppmd7Dec.c 7z/Types.h 7z/Xz.c 7z/Xz.h \
7z/XzCrc64.c 7z/XzCrc64.h 7z/XzDec.c 7z/XzIn.c 7z/Sha256.h \
7z/Delta.c 7z/Delta.h 7z/Alloc.h 7z/BraIA64.c 7z/CpuArch.c \
7z/CpuArch.h 7z/7zCrcOpt.c 7z/RotateDefs.h explode.c explode.h \
textnorm.c textnorm.h dlp.c dlp.h jsparse/js-norm.c \
jsparse/js-norm.h jsparse/lexglobal.h jsparse/textbuf.h uniq.c \
uniq.h version.c version.h mpool.c mpool.h filtering.h \
filtering.c fmap.c fmap.h perflogging.c perflogging.h \
default.h sha256.c sha256.h sha1.c sha1.h bytecode.c \
7z/XzCrc64.c 7z/XzCrc64.h 7z/XzDec.c 7z/XzIn.c 7z/Delta.c \
7z/Delta.h 7z/Alloc.h 7z/BraIA64.c 7z/CpuArch.c 7z/CpuArch.h \
7z/7zCrcOpt.c 7z/RotateDefs.h explode.c explode.h textnorm.c \
textnorm.h dlp.c dlp.h jsparse/js-norm.c jsparse/js-norm.h \
jsparse/lexglobal.h jsparse/textbuf.h uniq.c uniq.h version.c \
version.h mpool.c mpool.h filtering.h filtering.c fmap.c \
fmap.h perflogging.c perflogging.h default.h bytecode.c \
bytecode.h bytecode_vm.c bytecode_priv.h clambc.h cpio.c \
cpio.h macho.c macho.h ishield.c ishield.h type_desc.h \
bcfeatures.h bytecode_api.c bytecode_api_decl.c bytecode_api.h \
@ -896,8 +972,9 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bytecode_nojit.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-conv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-crypto.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-iowrap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-md5.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-others_common.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-qsort.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-regcomp.Plo@am__quote@
@ -906,8 +983,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-regfree.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-str.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-strlcpy.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-conv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-crypto.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-iowrap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-md5.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-others_common.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-qsort.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-regcomp.Plo@am__quote@
@ -1104,8 +1182,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-s_fp_sub.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-scanners.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-sf_base64decode.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-sha1.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-sha256.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-sis.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-special.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-spin.Plo@am__quote@
@ -1855,20 +1931,6 @@ libclamav_la-perflogging.lo: perflogging.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-perflogging.lo `test -f 'perflogging.c' || echo '$(srcdir)/'`perflogging.c
libclamav_la-sha256.lo: sha256.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-sha256.lo -MD -MP -MF $(DEPDIR)/libclamav_la-sha256.Tpo -c -o libclamav_la-sha256.lo `test -f 'sha256.c' || echo '$(srcdir)/'`sha256.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-sha256.Tpo $(DEPDIR)/libclamav_la-sha256.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sha256.c' object='libclamav_la-sha256.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-sha256.lo `test -f 'sha256.c' || echo '$(srcdir)/'`sha256.c
libclamav_la-sha1.lo: sha1.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-sha1.lo -MD -MP -MF $(DEPDIR)/libclamav_la-sha1.Tpo -c -o libclamav_la-sha1.lo `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-sha1.Tpo $(DEPDIR)/libclamav_la-sha1.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sha1.c' object='libclamav_la-sha1.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-sha1.lo `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
libclamav_la-bytecode.lo: bytecode.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-bytecode.lo -MD -MP -MF $(DEPDIR)/libclamav_la-bytecode.Tpo -c -o libclamav_la-bytecode.lo `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-bytecode.Tpo $(DEPDIR)/libclamav_la-bytecode.Plo
@ -2674,6 +2736,20 @@ libclamav_internal_utils_la-str.lo: str.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-str.lo `test -f 'str.c' || echo '$(srcdir)/'`str.c
libclamav_internal_utils_la-conv.lo: conv.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-conv.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-conv.Tpo -c -o libclamav_internal_utils_la-conv.lo `test -f 'conv.c' || echo '$(srcdir)/'`conv.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-conv.Tpo $(DEPDIR)/libclamav_internal_utils_la-conv.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conv.c' object='libclamav_internal_utils_la-conv.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-conv.lo `test -f 'conv.c' || echo '$(srcdir)/'`conv.c
libclamav_internal_utils_la-crypto.lo: crypto.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-crypto.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-crypto.Tpo -c -o libclamav_internal_utils_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-crypto.Tpo $(DEPDIR)/libclamav_internal_utils_la-crypto.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto.c' object='libclamav_internal_utils_la-crypto.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c
libclamav_internal_utils_la-iowrap.lo: iowrap.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-iowrap.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-iowrap.Tpo -c -o libclamav_internal_utils_la-iowrap.lo `test -f 'iowrap.c' || echo '$(srcdir)/'`iowrap.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-iowrap.Tpo $(DEPDIR)/libclamav_internal_utils_la-iowrap.Plo
@ -2681,13 +2757,6 @@ libclamav_internal_utils_la-iowrap.lo: iowrap.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-iowrap.lo `test -f 'iowrap.c' || echo '$(srcdir)/'`iowrap.c
libclamav_internal_utils_la-md5.lo: md5.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-md5.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-md5.Tpo -c -o libclamav_internal_utils_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-md5.Tpo $(DEPDIR)/libclamav_internal_utils_la-md5.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5.c' object='libclamav_internal_utils_la-md5.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
libclamav_internal_utils_la-others_common.lo: others_common.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-others_common.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-others_common.Tpo -c -o libclamav_internal_utils_la-others_common.lo `test -f 'others_common.c' || echo '$(srcdir)/'`others_common.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-others_common.Tpo $(DEPDIR)/libclamav_internal_utils_la-others_common.Plo
@ -2744,6 +2813,20 @@ libclamav_internal_utils_nothreads_la-str.lo: str.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_nothreads_la-str.lo `test -f 'str.c' || echo '$(srcdir)/'`str.c
libclamav_internal_utils_nothreads_la-conv.lo: conv.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_nothreads_la-conv.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_nothreads_la-conv.Tpo -c -o libclamav_internal_utils_nothreads_la-conv.lo `test -f 'conv.c' || echo '$(srcdir)/'`conv.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_nothreads_la-conv.Tpo $(DEPDIR)/libclamav_internal_utils_nothreads_la-conv.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conv.c' object='libclamav_internal_utils_nothreads_la-conv.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_nothreads_la-conv.lo `test -f 'conv.c' || echo '$(srcdir)/'`conv.c
libclamav_internal_utils_nothreads_la-crypto.lo: crypto.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_nothreads_la-crypto.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_nothreads_la-crypto.Tpo -c -o libclamav_internal_utils_nothreads_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_nothreads_la-crypto.Tpo $(DEPDIR)/libclamav_internal_utils_nothreads_la-crypto.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto.c' object='libclamav_internal_utils_nothreads_la-crypto.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_nothreads_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c
libclamav_internal_utils_nothreads_la-iowrap.lo: iowrap.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_nothreads_la-iowrap.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_nothreads_la-iowrap.Tpo -c -o libclamav_internal_utils_nothreads_la-iowrap.lo `test -f 'iowrap.c' || echo '$(srcdir)/'`iowrap.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_nothreads_la-iowrap.Tpo $(DEPDIR)/libclamav_internal_utils_nothreads_la-iowrap.Plo
@ -2751,13 +2834,6 @@ libclamav_internal_utils_nothreads_la-iowrap.lo: iowrap.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_nothreads_la-iowrap.lo `test -f 'iowrap.c' || echo '$(srcdir)/'`iowrap.c
libclamav_internal_utils_nothreads_la-md5.lo: md5.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_nothreads_la-md5.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_nothreads_la-md5.Tpo -c -o libclamav_internal_utils_nothreads_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_nothreads_la-md5.Tpo $(DEPDIR)/libclamav_internal_utils_nothreads_la-md5.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5.c' object='libclamav_internal_utils_nothreads_la-md5.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_nothreads_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
libclamav_internal_utils_nothreads_la-others_common.lo: others_common.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_nothreads_la-others_common.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_nothreads_la-others_common.Tpo -c -o libclamav_internal_utils_nothreads_la-others_common.lo `test -f 'others_common.c' || echo '$(srcdir)/'`others_common.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_nothreads_la-others_common.Tpo $(DEPDIR)/libclamav_internal_utils_nothreads_la-others_common.Plo

@ -28,6 +28,10 @@
#include <string.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "others.h"
#include "adc.h"

@ -24,9 +24,11 @@
#include <time.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "asn1.h"
#include "sha1.h"
#include "md5.h"
#include "bignum.h"
#include "matcher-hash.h"
@ -97,37 +99,19 @@ struct cli_asn1 {
};
static int map_sha1(fmap_t *map, const void *data, unsigned int len, uint8_t sha1[SHA1_HASH_SIZE]) {
SHA1Context ctx;
if(!fmap_need_ptr_once(map, data, len)) {
cli_dbgmsg("map_sha1: failed to read hash data\n");
return 1;
}
SHA1Init(&ctx);
while(len) {
unsigned int todo = MIN(len, map->pgsz);
SHA1Update(&ctx, data, todo);
data = (uint8_t *)data + todo;
len -= todo;
}
SHA1Final(&ctx, sha1);
return 0;
return (cl_sha1(data, len, sha1, NULL) == NULL);
}
static int map_md5(fmap_t *map, const void *data, unsigned int len, uint8_t *md5) {
cli_md5_ctx ctx;
if(!fmap_need_ptr_once(map, data, len)) {
cli_dbgmsg("map_md5: failed to read hash data\n");
return 1;
}
cli_md5_init(&ctx);
while(len) {
unsigned int todo = MIN(len, map->pgsz);
cli_md5_update(&ctx, data, len);
data = (uint8_t *)data + todo;
len -= todo;
}
cli_md5_final(md5, &ctx);
return 0;
return (cl_hash_data("md5", data, len, md5, NULL) == NULL);
}
@ -746,8 +730,8 @@ static int asn1_parse_mscat(fmap_t *map, size_t offset, unsigned int size, crtmg
const uint8_t *message, *attrs;
unsigned int dsize, message_size, attrs_size;
cli_crt_hashtype hashtype;
SHA1Context ctx;
cli_crt *x509;
EVP_MD_CTX ctx;
int result;
int isBlacklisted = 0;
@ -1037,10 +1021,11 @@ static int asn1_parse_mscat(fmap_t *map, size_t offset, unsigned int size, crtmg
break;
}
SHA1Init(&ctx);
SHA1Update(&ctx, "\x31", 1);
SHA1Update(&ctx, attrs + 1, attrs_size - 1);
SHA1Final(&ctx, sha1);
EVP_DigestInit(&ctx, EVP_sha1());
EVP_DigestUpdate(&ctx, "\x31", 1);
EVP_DigestUpdate(&ctx, attrs + 1, attrs_size - 1);
EVP_DigestFinal(&ctx, sha1, NULL);
EVP_MD_CTX_cleanup(&ctx);
if(!fmap_need_ptr_once(map, asn1.content, asn1.size)) {
cli_dbgmsg("asn1_parse_mscat: failed to read encryptedDigest\n");
@ -1278,16 +1263,17 @@ static int asn1_parse_mscat(fmap_t *map, size_t offset, unsigned int size, crtmg
}
if(hashtype == CLI_SHA1RSA) {
SHA1Init(&ctx);
SHA1Update(&ctx, "\x31", 1);
SHA1Update(&ctx, attrs + 1, attrs_size - 1);
SHA1Final(&ctx, sha1);
EVP_DigestInit(&ctx, EVP_sha1());
EVP_DigestUpdate(&ctx, "\x31", 1);
EVP_DigestUpdate(&ctx, attrs + 1, attrs_size - 1);
EVP_DigestFinal(&ctx, sha1, NULL);
EVP_MD_CTX_cleanup(&ctx);
} else {
cli_md5_ctx ctx;
cli_md5_init(&ctx);
cli_md5_update(&ctx, "\x31", 1);
cli_md5_update(&ctx, attrs + 1, attrs_size - 1);
cli_md5_final(sha1, &ctx);
EVP_DigestInit(&ctx, EVP_md5());
EVP_DigestUpdate(&ctx, "\x31", 1);
EVP_DigestUpdate(&ctx, attrs + 1, attrs_size - 1);
EVP_DigestFinal(&ctx, sha1, NULL);
EVP_MD_CTX_cleanup(&ctx);
}
if(!fmap_need_ptr_once(map, asn1.content, asn1.size)) {

@ -19,6 +19,11 @@
*/
#include <string.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "execs.h"
#include "others.h"

@ -35,6 +35,10 @@
#include <unistd.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "others.h"
#include "scanners.h"
#include "autoit.h"

@ -25,6 +25,10 @@
#include <string.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "scanners.h"
#include "cltypes.h"
#include "others.h"

@ -44,6 +44,10 @@ static char const rcsid[] = "$Id: blob.c,v 1.64 2007/02/12 22:25:14 njh Exp $";
#include <unistd.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "others.h"
#include "mbox.h"
#include "matcher.h"

@ -24,8 +24,14 @@
#include "clamav-config.h"
#endif
#include <string.h>
#include <assert.h>
#include <fcntl.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "dconf.h"
#include "clamav.h"
#include "others.h"
@ -38,7 +44,6 @@
#include "bytecode_api.h"
#include "bytecode_api_impl.h"
#include "builtin_bytecodes.h"
#include <string.h>
#define MAX_BC 64
#define BC_EVENTS_PER_SIG 2

@ -33,6 +33,11 @@
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "clambc.h"
#include "bytecode.h"

@ -23,6 +23,11 @@
#if HAVE_CONFIG_H
#include "clamav-config.h"
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "target.h"
#include "cltypes.h"

@ -22,6 +22,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "bytecode.h"
#include "bytecode_priv.h"

@ -22,6 +22,11 @@
#if HAVE_CONFIG_H
#include "clamav-config.h"
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "clamav.h"
#include "others.h"
#include "bytecode.h"

@ -24,6 +24,7 @@
#ifndef _WIN32
#include <sys/time.h>
#endif
#include "ClamBCModule.h"
#include "ClamBCDiagnostics.h"
#include "llvm/Analysis/DebugInfo.h"
@ -126,15 +127,20 @@ void LLVMInitializePowerPCAsmPrinter();
#undef PACKAGE_URL
#include "clamav-config.h"
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
extern "C" {
#include "libclamav/crypto.h"
}
#include "dconf.h"
#include "clamav.h"
#include "clambc.h"
#include "bytecode.h"
#include "bytecode_priv.h"
#include "type_desc.h"
extern "C" {
#include "md5.h"
}
#define MODULE "libclamav JIT: "
@ -2201,15 +2207,12 @@ int cli_vm_execute_jit(const struct cli_all_bc *bcs, struct cli_bc_ctx *ctx,
static unsigned char name_salt[16] = { 16, 38, 97, 12, 8, 4, 72, 196, 217, 144, 33, 124, 18, 11, 17, 253 };
static void setGuard(unsigned char* guardbuf)
{
cli_md5_ctx ctx;
char salt[48];
memcpy(salt, name_salt, 16);
for(unsigned i = 16; i < 48; i++)
salt[i] = cli_rndnum(255);
salt[i] = cli_rndnum(255);
cli_md5_init(&ctx);
cli_md5_update(&ctx, salt, 48);
cli_md5_final(guardbuf, &ctx);
cl_hash_data("md5", salt, 48, guardbuf, NULL);
}
static void addFPasses(FunctionPassManager &FPM, bool trusted, const TargetData *TD)

@ -32,6 +32,10 @@
#endif
#include <fcntl.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "others.h"
#include "mspack.h"

@ -27,7 +27,10 @@
#include <pthread.h>
#include <assert.h>
#include "md5.h"
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "mpool.h"
#include "clamav.h"
#include "cache.h"
@ -902,7 +905,7 @@ void cache_remove(unsigned char *md5, size_t size, const struct cl_engine *engin
int cache_check(unsigned char *hash, cli_ctx *ctx) {
fmap_t *map;
size_t todo, at = 0;
cli_md5_ctx md5;
EVP_MD_CTX hashctx;
int ret;
if(!ctx || !ctx->engine || !ctx->engine->cache)
@ -916,20 +919,27 @@ int cache_check(unsigned char *hash, cli_ctx *ctx) {
map = *ctx->fmap;
todo = map->len;
cli_md5_init(&md5);
EVP_DigestInit(&hashctx, EVP_md5());
while(todo) {
const void *buf;
size_t readme = todo < FILEBUFF ? todo : FILEBUFF;
if(!(buf = fmap_need_off_once(map, at, readme)))
return CL_EREAD;
todo -= readme;
at += readme;
if (cli_md5_update(&md5, buf, readme)) {
cli_errmsg("cache_check: error reading while generating hash!\n");
return CL_EREAD;
}
const void *buf;
size_t readme = todo < FILEBUFF ? todo : FILEBUFF;
if(!(buf = fmap_need_off_once(map, at, readme)))
return CL_EREAD;
todo -= readme;
at += readme;
if (!EVP_DigestUpdate(&hashctx, buf, readme)) {
cli_errmsg("cache_check: error reading while generating hash!\n");
return CL_EREAD;
}
}
cli_md5_final(hash, &md5);
EVP_DigestFinal(&hashctx, hash, NULL);
EVP_MD_CTX_cleanup(&hashctx);
ret = cache_lookup_hash(hash, map->len, ctx->engine->cache, ctx->recursion);
cli_dbgmsg("cache_check: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x is %s\n", hash[0], hash[1], hash[2], hash[3], hash[4], hash[5], hash[6], hash[7], hash[8], hash[9], hash[10], hash[11], hash[12], hash[13], hash[14], hash[15], (ret == CL_VIRUS) ? "negative" : "positive");
return ret;

@ -34,6 +34,10 @@
#include <string.h>
#include <errno.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "fmap.h"
#include "others.h"
#include "mspack.h"

@ -0,0 +1,189 @@
/*
* Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
*
* Author: Shawn Webb
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#if HAVE_CONF_H
#include "clamav-config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <math.h>
#include <sys/types.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#include "libclamav/conv.h"
#include "libclamav/crypto.h"
/** Get the expected decoded length of a base64-encoded string
* @param[in] data Base64-encoded string
* @param[in] len length of the string
* @return The expected decoded length of the base64-encoded string
*/
static size_t base64_len(const char *data, size_t len)
{
int padding=0;
size_t i;
if (!len)
return 0;
for (i=len-1; i > 0 && data[i] == '='; i--)
padding++;
return (size_t)((3*len)/4 - padding);
}
/** Decode a base64-encoded string
* @param[in] data The base64-encoded string
* @param[in] len Length of the base64-encoded string
* @param[out] obuf If obuf is not set to NULL, store the decoded data in obuf. Otherwise, the decoded data is stored in a dynamically-allocated buffer.
* @param[out] olen The length of the decoded data
* @return The base64-decoded data
*/
void *cl_base64_decode(char *data, size_t len, void *obuf, size_t *olen)
{
BIO *bio, *b64;
void *buf, *ret;
buf = (obuf) ? obuf : malloc(base64_len(data, len)+1);
if (!(buf))
return NULL;
b64 = BIO_new(BIO_f_base64());
if (!(b64)) {
if (!(obuf))
free(buf);
return NULL;
}
bio = BIO_new_mem_buf(data, len);
if (!(bio)) {
BIO_free(b64);
if (!(obuf))
free(buf);
return NULL;
}
bio = BIO_push(b64, bio);
BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL);
*olen = BIO_read(bio, buf, base64_len(data, len));
BIO_free_all(bio);
return buf;
}
/** Base64-encode data
* @param[in] data The data to be encoded
* @param[in] len The length of the data
* @return A pointer to the base64-encoded data. The data is stored in a dynamically-allocated buffer.
*/
char *cl_base64_encode(void *data, size_t len)
{
BIO *bio, *b64;
char *buf, *p;
size_t elen;
b64 = BIO_new(BIO_f_base64());
bio = BIO_new(BIO_s_mem());
bio = BIO_push(b64, bio);
BIO_write(bio, data, len);
BIO_flush(bio);
elen = (size_t)BIO_get_mem_data(bio, &buf);
/* Ensure we're dealing with a NULL-terminated string */
p = (char *)malloc(elen+1);
memcpy((void *)p, (void *)buf, elen);
p[elen] = 0x00;
buf = p;
BIO_free_all(bio);
return buf;
}
#if defined(CONV_SELF_TEST)
int main(int argc, char *argv[])
{
char *plaintext, *encoded, *decoded;
unsigned char *sha_plaintext, *sha_decoded;
size_t len;
int ret=0;
unsigned int shalen;
initialize_crypto();
plaintext = (argv[1]) ? argv[1] : "Hello. This is dog";
sha_plaintext = sha256(plaintext, strlen(plaintext), NULL, NULL);
if (!(sha_plaintext)) {
fprintf(stderr, "Could not generate sha256 of plaintext\n");
return 1;
}
encoded = base64_encode(plaintext, strlen(plaintext));
if (!(encoded)) {
fprintf(stderr, "Could not base64 encode plaintest\n");
return 1;
}
fprintf(stderr, "Base64 encoded: %s\n", encoded);
decoded = base64_decode(encoded, strlen(encoded), NULL, &len);
if (!(decoded)) {
fprintf(stderr, "Could not base64 decoded string\n");
return 1;
}
sha_decoded = sha256(decoded, len, NULL, &shalen);
if (!(sha_decoded)) {
fprintf(stderr, "Could not generate sha256 of decoded data\n");
return 1;
}
if (memcmp(sha_plaintext, sha_decoded, shalen)) {
fprintf(stderr, "Decoded does not match plaintext: %s\n", decoded);
ret = 1;
}
free(sha_decoded);
free(sha_plaintext);
free(encoded);
free(decoded);
cleanup_crypto();
return ret;
}
#endif

@ -0,0 +1,27 @@
/*
* Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
*
* Author: Shawn Webb
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#if !defined(_CLAMAV_CONV_H)
#define _CLAMAV_CONV_H
void *cl_base64_decode(char *, size_t, void *, size_t *);
char *cl_base64_encode(void *, size_t);
#endif

@ -32,6 +32,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "others.h"
#include "cpio.h"

@ -22,6 +22,10 @@
#include "clamav-config.h"
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "others.h"
#include "crtmgr.h"

@ -24,7 +24,6 @@
#include <time.h>
#include "bignum.h"
#include "sha1.h"
typedef enum { CLI_SHA1RSA, CLI_MD5RSA } cli_crt_hashtype;
typedef enum {VRFY_CODE, VRFY_TIME} cli_vrfy_type;

@ -0,0 +1,958 @@
/*
* Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
*
* Author: Shawn Webb
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#if HAVE_CONFIG_H
#include "clamav-config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#ifdef _WIN32
#include <io.h>
#endif
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <fcntl.h>
#if !defined(_WIN32)
#include <unistd.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "clamav.h"
#include "default.h"
#include "others.h"
#include "libclamav/conv.h"
#include "libclamav/str.h"
#if defined(_WIN32)
char * strptime(const char *buf, const char *fmt, struct tm *tm);
#endif
#if !defined(MIN)
#define MIN(x,y) ((x)<(y)?(x):(y))
#endif
int cl_initialize_crypto(void)
{
SSL_load_error_strings();
SSL_library_init();
OpenSSL_add_all_digests();
OpenSSL_add_all_algorithms();
OpenSSL_add_all_ciphers();
ERR_load_crypto_strings();
return 0;
}
void cl_cleanup_crypto(void)
{
EVP_cleanup();
}
unsigned char *cl_hash_data(char *alg, const void *buf, size_t len, unsigned char *obuf, unsigned int *olen)
{
EVP_MD_CTX ctx;
unsigned char *ret;
size_t mdsz;
const EVP_MD *md;
unsigned int i;
size_t cur;
md = EVP_get_digestbyname(alg);
if (!(md))
return NULL;
mdsz = EVP_MD_size(md);
ret = (obuf != NULL) ? obuf : (unsigned char *)malloc(mdsz);
if (!(ret))
return NULL;
if (!EVP_DigestInit(&ctx, md)) {
if (!(obuf))
free(ret);
if ((olen))
*olen = 0;
return NULL;
}
cur=0;
while (cur < len) {
size_t todo = MIN(EVP_MD_block_size(md), len-cur);
if (!EVP_DigestUpdate(&ctx, (void *)(((unsigned char *)buf)+cur), todo)) {
if (!(obuf))
free(ret);
if ((olen))
*olen = 0;
return NULL;
}
cur += todo;
}
if (!EVP_DigestFinal(&ctx, ret, &i)) {
if (!(obuf))
free(ret);
if ((olen))
*olen = 0;
return NULL;
}
EVP_MD_CTX_cleanup(&ctx);
if ((olen))
*olen = i;
return ret;
}
unsigned char *cl_hash_file_fd(int fd, char *alg, unsigned int *olen)
{
EVP_MD_CTX ctx;
const EVP_MD *md;
unsigned char *res;
md = EVP_get_digestbyname(alg);
if (!(md))
return NULL;
if (!EVP_DigestInit(&ctx, md)) {
return NULL;
}
res = cl_hash_file_fd_ctx(&ctx, fd, olen);
return res;
}
unsigned char *cl_hash_file_fd_ctx(EVP_MD_CTX *ctx, int fd, unsigned int *olen)
{
unsigned char *buf;
unsigned char *hash;
int mdsz;
unsigned int hashlen;
struct stat sb;
unsigned int blocksize;
#ifdef _WIN32
int nread;
#else
ssize_t nread;
#endif
mdsz = EVP_MD_CTX_size(ctx);
if (fstat(fd, &sb) < 0) {
return NULL;
}
#ifdef _WIN32
blocksize = 8192;
#else
blocksize = sb.st_blksize;
#endif
buf = (unsigned char *)malloc(blocksize);
if (!(buf)) {
return NULL;
}
hash = (unsigned char *)malloc(mdsz);
if (!(hash)) {
free(buf);
return NULL;
}
#ifdef _WIN32
while ((nread = _read(fd, buf, blocksize)) > 0) {
#else
while ((nread = read(fd, buf, blocksize)) > 0) {
#endif
if (!EVP_DigestUpdate(ctx, buf, nread)) {
free(buf);
free(hash);
return NULL;
}
}
if (!EVP_DigestFinal(ctx, hash, &hashlen)) {
free(hash);
free(buf);
return NULL;
}
EVP_MD_CTX_cleanup(&ctx);
if ((olen))
*olen = hashlen;
free(buf);
return hash;
}
unsigned char *cl_hash_file_fp(FILE *fp, char *alg, unsigned int *olen)
{
return cl_hash_file_fd(fileno(fp), alg, olen);
}
unsigned char *cl_sha256(const void *buf, size_t len, unsigned char *obuf, unsigned int *olen)
{
return cl_hash_data("sha256", buf, len, obuf, olen);
}
unsigned char *cl_sha1(const void *buf, size_t len, unsigned char *obuf, unsigned int *olen)
{
return cl_hash_data("sha1", buf, len, obuf, olen);
}
int cl_verify_signature_hash(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest)
{
EVP_MD_CTX ctx;
const EVP_MD *md;
size_t mdsz;
md = EVP_get_digestbyname(alg);
if (!(md))
return -1;
mdsz = EVP_MD_size(md);
if (!EVP_VerifyInit(&ctx, md)) {
return -1;
}
if (!EVP_VerifyUpdate(&ctx, digest, mdsz)) {
return -1;
}
if (EVP_VerifyFinal(&ctx, sig, siglen, pkey) != 0) {
return -1;
}
return 0;
}
int cl_verify_signature_fd(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, int fd)
{
EVP_MD_CTX ctx;
const EVP_MD *md;
size_t mdsz;
unsigned char *digest;
digest = cl_hash_file_fd(fd, alg, NULL);
if (!(digest))
return -1;
md = EVP_get_digestbyname(alg);
if (!(md))
return -1;
mdsz = EVP_MD_size(md);
if (!EVP_VerifyInit(&ctx, md)) {
free(digest);
return -1;
}
if (!EVP_VerifyUpdate(&ctx, digest, mdsz)) {
free(digest);
return -1;
}
if (EVP_VerifyFinal(&ctx, sig, siglen, pkey) != 0) {
free(digest);
return -1;
}
free(digest);
return 0;
}
int cl_verify_signature(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode)
{
EVP_MD_CTX ctx;
const EVP_MD *md;
size_t mdsz;
unsigned char *digest;
if (decode) {
unsigned char *newsig;
size_t newsiglen;
newsig = (unsigned char *)cl_base64_decode((char *)sig, siglen, NULL, &newsiglen);
if (!(newsig))
return -1;
sig = newsig;
siglen = newsiglen;
}
digest = cl_hash_data(alg, data, datalen, NULL, NULL);
if (!(digest)) {
if (decode)
free(sig);
return -1;
}
md = EVP_get_digestbyname(alg);
if (!(md)) {
free(digest);
if (decode)
free(sig);
return -1;
}
mdsz = EVP_MD_size(md);
if (!EVP_VerifyInit(&ctx, md)) {
free(digest);
if (decode)
free(sig);
return -1;
}
if (!EVP_VerifyUpdate(&ctx, digest, mdsz)) {
free(digest);
if (decode)
free(sig);
return -1;
}
if (EVP_VerifyFinal(&ctx, sig, siglen, pkey) != 0) {
free(digest);
if (decode)
free(sig);
return -1;
}
if (decode)
free(sig);
free(digest);
return 0;
}
int cl_verify_signature_hash_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest)
{
X509 *x509;
FILE *fp;
int res;
fp = fopen(x509path, "r");
if (!(fp)) {
return -1;
}
x509 = PEM_read_X509(fp, NULL, NULL, NULL);
if (!(x509)) {
fclose(fp);
return -1;
}
fclose(fp);
res = cl_verify_signature_hash_x509(x509, alg, sig, siglen, digest);
X509_free(x509);
return res;
}
int cl_verify_signature_fd_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, int fd)
{
X509 *x509;
FILE *fp;
int res;
fp = fopen(x509path, "r");
if (!(fp)) {
return -1;
}
x509 = PEM_read_X509(fp, NULL, NULL, NULL);
if (!(x509)) {
fclose(fp);
return -1;
}
fclose(fp);
res = cl_verify_signature_fd_x509(x509, alg, sig, siglen, fd);
X509_free(x509);
return res;
}
int cl_verify_signature_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode)
{
X509 *x509;
FILE *fp;
int res;
fp = fopen(x509path, "r");
if (!(fp)) {
return -1;
}
x509 = PEM_read_X509(fp, NULL, NULL, NULL);
if (!(x509)) {
fclose(fp);
return -1;
}
fclose(fp);
res = cl_verify_signature_x509(x509, alg, sig, siglen, data, datalen, decode);
X509_free(x509);
return res;
}
int cl_verify_signature_hash_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest)
{
EVP_PKEY *pkey;
int res;
pkey = X509_get_pubkey(x509);
if (!(pkey))
return -1;
res = cl_verify_signature_hash(pkey, alg, sig, siglen, digest);
EVP_PKEY_free(pkey);
return res;
}
int cl_verify_signature_fd_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, int fd)
{
EVP_PKEY *pkey;
int res;
pkey = X509_get_pubkey(x509);
if (!(pkey))
return -1;
res = cl_verify_signature_fd(pkey, alg, sig, siglen, fd);
EVP_PKEY_free(pkey);
return res;
}
int cl_verify_signature_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode)
{
EVP_PKEY *pkey;
int res;
pkey = X509_get_pubkey(x509);
if (!(pkey))
return -1;
res = cl_verify_signature(pkey, alg, sig, siglen, data, datalen, decode);
EVP_PKEY_free(pkey);
return res;
}
unsigned char *cl_sign_data_keyfile(char *keypath, char *alg, unsigned char *hash, unsigned int *olen, int encode)
{
FILE *fp;
EVP_PKEY *pkey;
unsigned char *res;
fp = fopen(keypath, "r");
if (!(fp)) {
return NULL;
}
pkey = PEM_read_PrivateKey(fp, NULL, NULL, NULL);
if (!(pkey)) {
fclose(fp);
return NULL;
}
fclose(fp);
res = cl_sign_data(pkey, alg, hash, olen, encode);
EVP_PKEY_free(pkey);
return res;
}
unsigned char *cl_sign_data(EVP_PKEY *pkey, char *alg, unsigned char *hash, unsigned int *olen, int encode)
{
EVP_MD_CTX ctx;
const EVP_MD *md;
unsigned int siglen;
unsigned char *sig;
md = EVP_get_digestbyname(alg);
if (!(md))
return NULL;
sig = (unsigned char *)calloc(1, EVP_PKEY_size(pkey));
if (!(sig)) {
free(hash);
return NULL;
}
if (!EVP_SignInit(&ctx, md)) {
free(sig);
free(hash);
return NULL;
}
if (!EVP_SignUpdate(&ctx, hash, EVP_MD_size(md))) {
free(sig);
free(hash);
return NULL;
}
if (!EVP_SignFinal(&ctx, sig, &siglen, pkey)) {
free(sig);
free(hash);
return NULL;
}
if (encode) {
unsigned char *newsig = (unsigned char *)cl_base64_encode(sig, siglen);
if (!(newsig)) {
free(sig);
free(hash);
return NULL;
}
free(sig);
sig = newsig;
siglen = (unsigned int)strlen((const char *)newsig);
}
free(hash);
*olen = siglen;
return sig;
}
unsigned char *cl_sign_file_fd(int fd, EVP_PKEY *pkey, char *alg, unsigned int *olen, int encode)
{
unsigned char *hash, *res;
unsigned int hashlen;
hash = cl_hash_file_fd(fd, alg, &hashlen);
if (!(hash)) {
return NULL;
}
res = cl_sign_data(pkey, alg, hash, olen, encode);
free(hash);
return res;
}
unsigned char *cl_sign_file_fp(FILE *fp, EVP_PKEY *pkey, char *alg, unsigned int *olen, int encode)
{
return cl_sign_file_fd(fileno(fp), pkey, alg, olen, encode);
}
EVP_PKEY *cl_get_pkey_file(char *keypath)
{
EVP_PKEY *pkey;
FILE *fp;
fp = fopen(keypath, "r");
if (!(fp))
return NULL;
if (!(pkey = PEM_read_PrivateKey(fp, NULL, NULL, NULL))) {
fclose(fp);
return NULL;
}
fclose(fp);
return pkey;
}
X509 *cl_get_x509_from_mem(void *data, unsigned int len)
{
X509 *cert;
BIO *cbio;
cbio = BIO_new_mem_buf(data, len);
if (!(cbio))
return NULL;
cert = PEM_read_bio_X509(cbio, NULL, 0, NULL);
BIO_free(cbio);
return cert;
}
int cl_validate_certificate_chain_ts_dir(char *tsdir, char *certpath)
{
char **authorities=NULL, **t, *fullpath;
size_t nauths = 0;
int res;
DIR *dp;
struct dirent *dirent;
#if defined(HAVE_READDIR_R_3) || defined(HAVE_READDIR_R_2)
union {
struct dirent d;
char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];
} result;
#endif
dp = opendir(tsdir);
if (!(dp))
return CL_EOPEN;
#if defined(HAVE_READDIR_R_3)
while (!readdir_r(dp, &result.d, &dirent) && dirent) {
#elif defined(HAVE_READDIR_R_2)
while ((dirent = (struct dirent *)readdir_r(dp, &result.d))) {
#else
while ((dirent = readdir(dp))) {
#endif
if (dirent->d_name[0] == '.')
continue;
if (!cli_strbcasestr(dirent->d_name, ".crt"))
continue;
t = (char **)realloc(authorities, sizeof(char **) * (nauths + 1));
if (!(t)) {
if (nauths) {
while (nauths > 0)
free(authorities[--nauths]);
free(authorities);
return -1;
}
}
authorities = t;
authorities[nauths] = (char *)malloc(strlen(tsdir) + strlen(dirent->d_name) + 2);
if (!authorities[nauths]) {
if (nauths) {
while (nauths > 0)
free(authorities[nauths--]);
free(authorities[0]);
free(authorities);
return -1;
}
}
sprintf(authorities[nauths], "%s"PATHSEP"%s", tsdir, dirent->d_name);
nauths++;
}
t = (char **)realloc(authorities, sizeof(char **) * (nauths + 1));
if (!(t)) {
if (nauths) {
while (nauths > 0)
free(authorities[--nauths]);
free(authorities);
return -1;
}
}
authorities = t;
authorities[nauths] = NULL;
closedir(dp);
res = cl_validate_certificate_chain(authorities, NULL, certpath);
while (nauths > 0)
free(authorities[--nauths]);
free(authorities);
return res;
}
int cl_validate_certificate_chain(char **authorities, char *crlpath, char *certpath)
{
X509_STORE *store=NULL;
X509_STORE_CTX *store_ctx;
X509_LOOKUP *lookup=NULL;
X509_CRL *crl=NULL;
X509_VERIFY_PARAM *param=NULL;
X509 *cert;
unsigned long i;
int res;
store = X509_STORE_new();
if (!(store)) {
return -1;
}
X509_STORE_set_flags(store, 0);
lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
if (!(lookup)) {
X509_STORE_free(store);
return -1;
}
if ((crlpath)) {
crl = cl_load_crl(crlpath);
if (!(crl)) {
X509_STORE_free(store);
return -1;
}
X509_STORE_add_crl(store, crl);
param = X509_VERIFY_PARAM_new();
if ((param)) {
X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_CRL_CHECK);
X509_STORE_set1_param(store, param);
} else {
X509_STORE_free(store);
X509_CRL_free(crl);
return -1;
}
}
/* Support multi-tiered setups */
for (i=0; authorities[i]; i++) {
if (!X509_LOOKUP_load_file(lookup, authorities[i], X509_FILETYPE_PEM)) {
X509_STORE_free(store);
if ((crl))
X509_CRL_free(crl);
if ((param))
X509_VERIFY_PARAM_free(param);
return -1;
}
}
lookup = X509_STORE_add_lookup(store, X509_LOOKUP_hash_dir());
if (!(lookup)) {
X509_STORE_free(store);
if ((crl))
X509_CRL_free(crl);
if ((param))
X509_VERIFY_PARAM_free(param);
return -1;
}
X509_LOOKUP_add_dir(lookup, NULL, X509_FILETYPE_DEFAULT);
store_ctx = X509_STORE_CTX_new();
if (!(store_ctx)) {
X509_STORE_free(store);
if ((crl))
X509_CRL_free(crl);
if ((param))
X509_VERIFY_PARAM_free(param);
return -1;
}
cert = cl_load_cert(certpath);
if (!(cert)) {
X509_STORE_CTX_free(store_ctx);
X509_STORE_free(store);
if ((crl))
X509_CRL_free(crl);
if ((param))
X509_VERIFY_PARAM_free(param);
return -1;
}
if (!X509_STORE_CTX_init(store_ctx, store, cert, NULL)) {
X509_STORE_CTX_free(store_ctx);
X509_STORE_free(store);
if ((crl))
X509_CRL_free(crl);
if ((param))
X509_VERIFY_PARAM_free(param);
X509_free(cert);
return -1;
}
res = X509_verify_cert(store_ctx);
X509_STORE_CTX_free(store_ctx);
if ((crl))
X509_CRL_free(crl);
if ((param))
X509_VERIFY_PARAM_free(param);
X509_STORE_free(store);
X509_free(cert);
return (res > 0);
}
X509 *cl_load_cert(const char *certpath)
{
X509 *cert;
BIO *bio;
bio = BIO_new(BIO_s_file());
if (!(bio))
return NULL;
if (BIO_read_filename(bio, certpath) != 1) {
BIO_free(bio);
return NULL;
}
cert = PEM_read_bio_X509_AUX(bio, NULL, NULL, NULL);
BIO_free(bio);
return cert;
}
struct tm *cl_ASN1_GetTimeT(ASN1_TIME *timeobj)
{
struct tm *t;
char* str;
size_t i = 0;
const char *fmt;
time_t localt;
#ifdef _WIN32
struct tm localtm, *ltm;
#else
struct tm localtm;
#endif
if (!(timeobj) || !(timeobj->data))
return NULL;
str = (char *)(timeobj->data);
if (strlen(str) < 12)
return NULL;
t = (struct tm *)calloc(1, sizeof(struct tm));
if (!(t))
return NULL;
if (timeobj->type == V_ASN1_UTCTIME) {
/* two digit year */
fmt = "%y%m%d%H%M%S";
if (str[3] == '0') {
str[2] = '0';
str[3] = '9';
} else {
str[3]--;
}
}
else if (timeobj->type == V_ASN1_GENERALIZEDTIME) {
/* four digit year */
fmt = "%Y%m%d%H%M%S";
if (str[5] == '0') {
str[4] = '0';
str[5] = '9';
} else {
str[5]--;
}
}
if (!strptime(str, fmt, t)) {
free(t);
return NULL;
}
/* Convert to local time */
localt = time(NULL);
#ifdef _WIN32
ltm = localtime(&localt);
memcpy((void *)(&localtm), (void *)ltm, sizeof(struct tm));
#else
localtime_r(&localt, &localtm);
#endif
t->tm_isdst = localtm.tm_isdst;
return t;
}
X509_CRL *cl_load_crl(const char *file)
{
X509_CRL *x=NULL;
FILE *fp;
struct tm *tm;
time_t crltime;
if (!(file))
return NULL;
fp = fopen(file, "r");
if (!(fp))
return NULL;
x = PEM_read_X509_CRL(fp, NULL, NULL, NULL);
fclose(fp);
if ((x)) {
tm = cl_ASN1_GetTimeT(x->crl->nextUpdate);
if (!(tm)) {
X509_CRL_free(x);
return NULL;
}
#if !defined(_WIN32)
if (timegm(tm) < time(NULL)) {
X509_CRL_free(x);
free(tm);
return NULL;
}
#endif
free(tm);
}
return x;
}

@ -0,0 +1,277 @@
/*
* Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
*
* Author: Shawn Webb
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#if !defined(_CLAMAV_CRYPTO_H)
#define _CLAMAV_CRYPTO_H
/**
* \defgroup CryptoAPI ClamAV Crypto API
* @{
*/
#define SHA1_HASH_SIZE 20
#define SHA256_HASH_SIZE 32
/**
* Initialize the crypto system.
* @return Always returns 0
*/
int cl_initialize_crypto(void);
/** Clean up the crypto system prior to program exit.
*/
void cl_cleanup_crypto(void);
/** Generate a hash of data.
@param[in] alg The hashing algorithm to use
@param[in] buf The data to be hashed
@param[in] len The length of the to-be-hashed data
@param[out] obuf An optional buffer to store the generated hash. Use NULL to dynamically allocate buffer.
@param[out] olen An optional pointer that stores how long the generated hash is.
@return A pointer to the generated hash or obuf if obuf is not NULL.
*/
unsigned char *cl_hash_data(char *alg, const void *buf, size_t len, unsigned char *obuf, unsigned int *olen);
/** Generate a hash of a file.
@param[in] ctx A pointer to the OpenSSL EVP_MD_CTX object
@param[in] fd The file descriptor
@param[out] olen An optional pointer that stores how long the generated hash is
@return A pointer to a dynamically-created buffer that holds the generated hash
*/
unsigned char *cl_hash_file_fd_ctx(EVP_MD_CTX *ctx, int fd, unsigned int *olen);
/** Generate a hash of a file.
@param[in] fd The file descriptor
@param[in] alg The hashing algorithm to use
@param[out] olen An optional pointer that stores how long the generated hash is
@return A pointer to a dynamically-created buffer that holds the generated hash
*/
unsigned char *cl_hash_file_fd(int fd, char *alg, unsigned int *olen);
/** Generate a hash of a file.
@param[in] fp A pointer to a FILE object
@param[in] alg The hashing algorithm to use
@param[out] olen An optional pointer that stores how long the generated hash is
@return A pointer to a dynamically-created buffer that holds the generated hash
*/
unsigned char *cl_hash_file_fp(FILE *fp, char *alg, unsigned int *olen);
/** Generate a sha256 hash of data
@param[in] buf The data to hash
@param[in] len The length of the to-be-hashed data
@param[out] obuf An optional pointer to store the generated hash. Use NULL to dynamically allocate buffer.
@param[out] olen An optional pointer that stores how long the generated hash is.
@return A pointer to the buffer that holds the generated hash
*/
unsigned char *cl_sha256(const void *buf, size_t len, unsigned char *obuf, unsigned int *olen);
/** Generate a sha1 hash of data
@param[in] buf The data to hash
@param[in] len The length of the to-be-hashed data
@param[out] obuf An optional pointer to store the generated hash. Use NULL to dynamically allocate buffer.
@param[out] olen An optional pointer that stores how long the generated hash is.
@return A pointer to the buffer that holds the generated hash or obuf if obuf is not NULL
*/
unsigned char *cl_sha1(const void *buf, size_t len, unsigned char *obuf, unsigned int *olen);
/** Verify validity of signed data
@param[in] pkey The public key of the keypair that signed the data
@param[in] alg The algorithm used to hash the data
@param[in] sig The signature block
@param[in] siglen The length of the signature
@param[in] data The data that was signed
@param[in] datalen The length of the data
@param[in] decode Whether or not to base64-decode the signature prior to verification. 1 for yes, 0 for no.
@return 0 for success, -1 for error or invalid signature
*/
int cl_verify_signature(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode);
/** Verify validity of signed data
@param[in] pkey The public key of the keypair that signed the data
@param[in] alg The algorithm used to hash the data
@param[in] sig The signature block
@param[in] siglen The length of the signature
@param[in] digest The hash of the signed data
@return 0 for success, -1 for error or invalid signature
*/
int cl_verify_signature_hash(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest);
/** Verify validity of signed data
@param[in] pkey The public key of the keypair that signed the data
@param[in] alg The algorithm used to hash the data
@param[in] sig The signature block
@param[in] siglen The length of the signature
@param[in] fd The file descriptor
@return 0 for success, -1 for error or invalid signature
*/
int cl_verify_signature_fd(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, int fd);
/** Verify validity of signed data
@param[in] x509path The path to the public key of the keypair that signed the data
@param[in] alg The algorithm used to hash the data
@param[in] sig The signature block
@param[in] siglen The length of the signature
@param[in] digest The hash of the signed data
@return 0 for success, -1 for error or invalid signature
*/
int cl_verify_signature_hash_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest);
/** Verify validity of signed data
@param[in] x509path The path to the public key of the keypair that signed the data
@param[in] alg The algorithm used to hash the data
@param[in] sig The signature block
@param[in] siglen The length of the signature
@param[in] fd The file descriptor
@return 0 for success, -1 for error or invalid signature
*/
int cl_verify_signature_fd_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, int fd);
/** Verify validity of signed data
@param[in] x509path The path to the public key of the keypair that signed the data
@param[in] alg The algorithm used to hash the data
@param[in] sig The signature block
@param[in] siglen The length of the signature
@param[in] data The data that was signed
@param[in] datalen The length of the data
@param[in] decode Whether or not to base64-decode the signature prior to verification. 1 for yes, 0 for no.
@return 0 for success, -1 for error or invalid signature
*/
int cl_verify_signature_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode);
/** Verify validity of signed data
@param[in] x509 The X509 object of the public key of the keypair that signed the data
@param[in] alg The algorithm used to hash the data
@param[in] sig The signature block
@param[in] siglen The length of the signature
@param[in] digest The hash of the signed data
@return 0 for success, -1 for error or invalid signature
*/
int cl_verify_signature_hash_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest);
/** Verify validity of signed data
@param[in] x509 The X509 object of the public key of the keypair that signed the data
@param[in] alg The algorithm used to hash the data
@param[in] sig The signature block
@param[in] siglen The length of the signature
@param[in] fd The file descriptor
@return 0 for success, -1 for error or invalid signature
*/
int cl_verify_signature_fd_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, int fd);
/** Verify validity of signed data
@param[in] x509 The X509 object of the public key of the keypair that signed the data
@param[in] alg The algorithm used to hash the data
@param[in] sig The signature block
@param[in] siglen The length of the signature
@param[in] data The data that was signed
@param[in] datalen The length of the data
@param[in] decode Whether or not to base64-decode the signature prior to verification. 1 for yes, 0 for no.
@return 0 for success, -1 for error or invalid signature
*/
int cl_verify_signature_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode);
/** Get an X509 object from memory
* @param[in] data A pointer to a spot in memory that contains the PEM X509 cert
* @param[in] len The length of the data
* @return a pointer to the X509 object on success, NULL on error
*/
X509 *cl_get_x509_from_mem(void *data, unsigned int len);
/** Validate an X509 certificate chain, with the chain being located in a directory
@param[in] tsdir The path to the trust store directory
@param[in] certpath The path to the X509 certificate to be validated.
@return 0 for success, -1 for error or invalid certificate.
*/
int cl_validate_certificate_chain_ts_dir(char *tsdir, char *certpath);
/** Validate an X509 certificate chain with support for a CRL
@param[in] authorities A NULL-terminated array of strings that hold the path of the CA's X509 certificate
@param[in] crlpath An optional path to the CRL file. NULL if no CRL.
@param[in] certpath The path to the X509 certificate to be validated.
@return 0 for success, -1 for error or invalid certificate.
*/
int cl_validate_certificate_chain(char **authorities, char *crlpath, char *certpath);
/** Load an X509 certificate from a file
@param[in] certpath The path to the X509 certificate
*/
X509 *cl_load_cert(const char *certpath);
/** Parse an ASN1_TIME object
@param[in] timeobj The ASN1_TIME object
@return A pointer to a (struct tm). Adjusted for time zone and daylight savings time.
*/
struct tm *cl_ASN1_GetTimeT(ASN1_TIME *timeobj);
/** Load a CRL file into an X509_CRL object
@param[in] file The path to the CRL
@return A pointer to an X509_CRL object or NULL on error.
*/
X509_CRL *cl_load_crl(const char *timeobj);
/** Sign data with a key stored on disk
@param[in] keypath The path to the RSA private key
@param[in] alg The hash/signature algorithm to use
@param[in] hash The hash to sign
@param[out] olen A pointer that stores the size of the signature
@param[in] Whether or not to base64-encode the signature. 1 for yes, 0 for no.
@return The generated signature
*/
unsigned char *cl_sign_data_keyfile(char *keypath, char *alg, unsigned char *hash, unsigned int *olen, int encode);
/** Sign data with an RSA private key object
@param[in] pkey The RSA private key object
@param[in] alg The hash/signature algorithm to use
@param[in] hash The hash to sign
@param[out] olen A pointer that stores the size of the signature
@param[in] Whether or not to base64-encode the signature. 1 for yes, 0 for no.
@return The generated signature
*/
unsigned char *cl_sign_data(EVP_PKEY *pkey, char *alg, unsigned char *hash, unsigned int *olen, int encode);
/** Sign a file with an RSA private key object
@param[in] fd The file descriptor
@param[in] pkey The RSA private key object
@param[in] alg The hash/signature algorithm to use
@param[out] olen A pointer that stores the size of the signature
@param[in] encode Whether or not to base64-encode the signature. 1 for yes, 0 for no.
*/
unsigned char *cl_sign_file_fd(int fd, EVP_PKEY *pkey, char *alg, unsigned int *olen, int encode);
/** Sign a file with an RSA private key object
@param[in] fp A pointer to a FILE object
@param[in] pkey The RSA private key object
@param[in] alg The hash/signature algorithm to use
@param[out] olen A pointer that stores the size of the signature
@param[in] encode Whether or not to base64-encode the signature. 1 for yes, 0 for no.
*/
unsigned char *cl_sign_file_fp(FILE *fp, EVP_PKEY *pkey, char *alg, unsigned int *olen, int encode);
/** Get the Private Key stored on disk
* @param[in] keypath The path on disk where the private key is stored
* @return A pointer to the EVP_PKEY object that contains the private key in memory
*/
EVP_PKEY *cl_get_pkey_file(char *keypath);
/**
* @}
*/
#endif

@ -35,6 +35,10 @@
#include <time.h>
#include <errno.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "clamav.h"
#include "others.h"
#include "dsig.h"
@ -42,7 +46,6 @@
#include "cvd.h"
#include "readdb.h"
#include "default.h"
#include "sha256.h"
#define TAR_BLOCKSIZE 512
@ -194,6 +197,11 @@ static void cli_tgzload_cleanup(int comp, struct cli_dbio *dbio, int fdd)
free(dbio->buf);
dbio->buf = NULL;
}
if (dbio->hashctx) {
EVP_MD_CTX_destroy(dbio->hashctx);
dbio->hashctx = NULL;
}
}
static int cli_tgzload(int fd, struct cl_engine *engine, unsigned int *signo, unsigned int options, struct cli_dbio *dbio, struct cli_dbinfo *dbinfo)
@ -312,7 +320,14 @@ static int cli_tgzload(int fd, struct cl_engine *engine, unsigned int *signo, un
dbio->readsize = dbio->size < dbio->bufsize ? dbio->size : dbio->bufsize - 1;
dbio->bufpt = NULL;
dbio->readpt = dbio->buf;
sha256_init(&dbio->sha256ctx);
if (!(dbio->hashctx)) {
dbio->hashctx = EVP_MD_CTX_create();
if (!(dbio->hashctx)) {
cli_tgzload_cleanup(compr, dbio, fdd);
return CL_EMALFDB;
}
EVP_DigestInit(dbio->hashctx, EVP_sha256());
}
dbio->bread = 0;
/* cli_dbgmsg("cli_tgzload: Loading %s, size: %u\n", name, size); */
@ -346,7 +361,8 @@ static int cli_tgzload(int fd, struct cl_engine *engine, unsigned int *signo, un
cli_tgzload_cleanup(compr, dbio, fdd);
return CL_EMALFDB;
}
sha256_final(&dbio->sha256ctx, hash);
EVP_DigestFinal(dbio->hashctx, hash, NULL);
EVP_DigestInit(dbio->hashctx, EVP_sha256());
if(memcmp(db->hash, hash, 32)) {
cli_errmsg("cli_tgzload: Invalid checksum for file %s\n", name);
cli_tgzload_cleanup(compr, dbio, fdd);
@ -587,6 +603,8 @@ int cli_cvdload(FILE *fs, struct cl_engine *engine, unsigned int *signo, unsigne
struct cli_dbinfo *dbinfo = NULL;
char *dupname;
dbio.hashctx = NULL;
cli_dbgmsg("in cli_cvdload()\n");
/* verify */

@ -25,8 +25,6 @@
#include <zlib.h>
#include "clamav.h"
#include "sha256.h"
struct cli_dbio {
gzFile gzs;
FILE *fs;
@ -34,7 +32,7 @@ struct cli_dbio {
char *buf, *bufpt, *readpt;
unsigned int usebuf, bufsize, readsize;
unsigned int chkonly;
SHA256_CTX sha256ctx;
EVP_MD_CTX *hashctx;
};
int cli_cvdload(FILE *fs, struct cl_engine *engine, unsigned int *signo, unsigned int options, unsigned int dbtype, const char *filename, unsigned int chkonly);

@ -29,6 +29,10 @@
#include <ctype.h>
#include <zlib.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "clamav.h"
#include "cltypes.h"
#include "dconf.h"

@ -26,6 +26,10 @@
#include <string.h>
#include <assert.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "others.h"
#include "disasmpriv.h"

@ -24,6 +24,10 @@
#include "clamav-config.h"
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>

@ -49,6 +49,10 @@
#include <libxml/xmlreader.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "others.h"
#include "dmg.h"

@ -27,12 +27,15 @@
#include <stdlib.h>
#include <ctype.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "clamav.h"
#include "others.h"
#include "dsig.h"
#include "str.h"
#include "bignum.h"
#include "sha256.h"
#define CLI_NSTR "118640995551645342603070001658453189751527774412027743746599405743243142607464144767361060640655844749760788890022283424922762488917565551002467771109669598189410434699034532232228621591089508178591428456220796841621637175567590476666928698770143328137383952820383197532047771780196576957695822641224262693037"
@ -108,7 +111,6 @@ int cli_versig(const char *md5, const char *dsig)
mp_int n, e;
char *pt, *pt2;
if(strlen(md5) != 32 || !isalnum(md5[0])) {
/* someone is trying to fool us with empty/malformed MD5 ? */
cli_errmsg("SECURITY WARNING: MD5 basic test failure.\n");
@ -156,7 +158,7 @@ int cli_versig2(const unsigned char *sha256, const char *dsig_str, const char *n
unsigned char *decoded, digest1[HASH_LEN], digest2[HASH_LEN], digest3[HASH_LEN], *salt;
unsigned char mask[BLK_LEN], data[BLK_LEN], final[8 + 2 * HASH_LEN], c[4];
unsigned int i, rounds;
SHA256_CTX ctx;
EVP_MD_CTX ctx;
mp_int n, e;
mp_init(&e);
@ -184,10 +186,12 @@ int cli_versig2(const unsigned char *sha256, const char *dsig_str, const char *n
for(i = 0; i < rounds; i++) {
c[2] = (unsigned char) (i / 256);
c[3] = (unsigned char) i;
sha256_init(&ctx);
sha256_update(&ctx, digest2, HASH_LEN);
sha256_update(&ctx, c, 4);
sha256_final(&ctx, digest3);
EVP_DigestInit(&ctx, EVP_sha256());
EVP_DigestUpdate(&ctx, digest2, HASH_LEN);
EVP_DigestUpdate(&ctx, c, 4);
EVP_DigestFinal(&ctx, digest3, NULL);
EVP_MD_CTX_cleanup(&ctx);
if(i + 1 == rounds)
memcpy(&data[i * 32], digest3, BLK_LEN - i * HASH_LEN);
else
@ -209,9 +213,10 @@ int cli_versig2(const unsigned char *sha256, const char *dsig_str, const char *n
memcpy(&final[8], sha256, HASH_LEN);
memcpy(&final[8 + HASH_LEN], salt, SALT_LEN);
sha256_init(&ctx);
sha256_update(&ctx, final, sizeof(final));
sha256_final(&ctx, digest1);
EVP_DigestInit(&ctx, EVP_sha256());
EVP_DigestUpdate(&ctx, final, sizeof(final));
EVP_DigestFinal(&ctx, digest1, NULL);
EVP_MD_CTX_cleanup(&ctx);
return memcmp(digest1, digest2, HASH_LEN) ? CL_EVERIFY : CL_SUCCESS;
}

@ -33,6 +33,10 @@
#endif
#include <time.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "elf.h"
#include "clamav.h"

@ -35,6 +35,10 @@
#include <assert.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "clamav.h"
#include "others.h"
#include "htmlnorm.h"

@ -19,14 +19,20 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#ifndef _WIN32
#include <sys/time.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "events.h"
#include "others.h"
#include "7z/7zCrc.h"
#include "str.h"
#include <string.h>
#ifndef _WIN32
#include <sys/time.h>
#endif
struct cli_event {
const char *name;

@ -38,6 +38,10 @@
#include <string.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "explode.h"
#include "others.h"

@ -30,6 +30,10 @@
#include <unistd.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "clamav.h"
#include "filetypes.h"
#include "others.h"

@ -22,6 +22,11 @@
#if HAVE_CONFIG_H
#include "clamav-config.h"
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "filtering.h"
#include "matcher-ac.h"
#include <string.h>

@ -41,6 +41,10 @@
#include <pthread.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "others.h"
#include "cltypes.h"

@ -18,6 +18,10 @@
* MA 02110-1301, USA.
*/
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "others.h"
#include "fpu.h"

@ -40,6 +40,10 @@
#include <stdlib.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "rebuildpe.h"
#include "others.h"

@ -31,6 +31,10 @@
#include <fcntl.h>
#include <zlib.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "others.h"
#include "gpt.h"

@ -25,6 +25,10 @@
#include <stdio.h>
#include <string.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "clamav.h"
#include "others.h"

@ -22,6 +22,10 @@
#include "clamav-config.h"
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "others.h"
#include "hfsplus.h"

@ -53,8 +53,11 @@
#include <errno.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "hostid.h"
#include "libclamav/md5.h"
#include "libclamav/others.h"
struct device *get_device_entry(struct device *devices, size_t *ndevices, const char *name)
@ -240,8 +243,8 @@ char *internal_get_host_id(void)
size_t i;
unsigned char raw_md5[16];
char *printable_md5;
cli_md5_ctx ctx;
struct device *devices;
EVP_MD_CTX ctx;
devices = get_devices();
if (!(devices))
@ -253,11 +256,12 @@ char *internal_get_host_id(void)
return NULL;
}
cli_md5_init(&ctx);
EVP_DigestInit(&ctx, EVP_md5());
for (i=0; devices[i].name != NULL; i++)
cli_md5_update(&ctx, devices[i].mac, sizeof(devices[i].mac));
EVP_DigestUpdate(&ctx, devices[i].mac, sizeof(devices[i].mac));
cli_md5_final(raw_md5, &ctx);
EVP_DigestFinal(&ctx, raw_md5, NULL);
EVP_MD_CTX_cleanup(&ctx);
for (i=0; devices[i].name != NULL; i++)
free(devices[i].name);

@ -40,6 +40,10 @@
#include <stdio.h>
#include <ctype.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "fmap.h"
#include "others.h"
#include "htmlnorm.h"

@ -48,6 +48,10 @@ const char inflate64_copyright[] =
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "inflate64_priv.h"
#include <stdlib.h> /* calloc/free */

@ -20,6 +20,10 @@
#include <sys/types.h>
#include "is_tar.h"
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "others.h"
#define isodigit(c) ( ((c) >= '0') && ((c) <= '7') )

@ -42,6 +42,10 @@
#endif
#include <zlib.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "scanners.h"
#include "cltypes.h"
#include "others.h"

@ -19,6 +19,11 @@
*/
#include <string.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "scanners.h"
#include "iso9660.h"
#include "fmap.h"

@ -33,6 +33,10 @@
#endif
#include <time.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "jpeg.h"
#include "clamav.h"

@ -29,6 +29,15 @@
#include <sys/types.h>
#include <errno.h>
#if defined(_WIN32)
#include <WinSock2.h>
#include <Windows.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "libclamav/others.h"
#include "libclamav/clamav.h"

@ -34,6 +34,10 @@
#include <ctype.h>
#include <assert.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "libclamav/crypto.h"
#include "cltypes.h"
#include "jsparse/lexglobal.h"
#include "hashtab.h"

@ -164,12 +164,6 @@ CLAMAV_PRIVATE {
cli_ftw;
cli_unlink;
cli_writen;
SHA1Init;
SHA1Update;
SHA1Final;
sha256_init;
sha256_update;
sha256_final;
cli_url_canon;
cli_strerror;
decodeLine;
@ -204,6 +198,36 @@ CLAMAV_PRIVATE {
cli_disasm_one;
cli_utf16_to_utf8;
get_fpu_endian;
cl_initialize_crypto;
cl_cleanup_crypto;
cl_hash_data;
cl_hash_file_fd;
cl_hash_file_fp;
cl_hash_file_fd_ctx;
cl_sha256;
cl_sha1;
cl_verify_signature;
cl_verify_signature_x509_keyfile;
cl_verify_signature_x509;
cl_get_x509_from_mem;
cl_validate_certificate_chain_ts_dir;
cl_validate_certificate_chain;
cl_verify_signature_fd;
cl_verify_signature_fd_x509;
cl_verify_signature_fd_x509_keyfile;
cl_verify_signature_hash;
cl_verify_signature_hash_x509;
cl_verify_signature_hash_x509_keyfile;
cl_load_cert;
cl_ASN1_GetTimeT;
cl_load_crl;
sl_sign_data_keyfile;
cl_sign_data;
cl_sign_file_fd;
cl_sign_file_fp;
cl_get_pkey_file;
cl_base64_decode;
cl_base64_encode;
local:
*;
};

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save