diff options
author | Tomas Kukosa <tomas.kukosa@siemens.com> | 2006-08-10 06:06:21 +0000 |
---|---|---|
committer | Tomas Kukosa <tomas.kukosa@siemens.com> | 2006-08-10 06:06:21 +0000 |
commit | 73ddcc157a1f287b90028117b0ea1e9c2a0e6cdc (patch) | |
tree | 6fe25b8dedea016d12b4874ca83e030a7293cb5e /epan/epan.c | |
parent | f2a2bed08f931977467f7a956b9f2ef52dfcaef4 (diff) |
GnuTLS/libgcrypt initialization moved to epan.c
svn path=/trunk/; revision=18863
Diffstat (limited to 'epan/epan.c')
-rw-r--r-- | epan/epan.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/epan/epan.c b/epan/epan.c index 5fe361a40a..05e274e85b 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -9,6 +9,19 @@ #include "config.h" #endif +#if (defined(HAVE_LIBGCRYPT) || defined(HAVE_LIBGNUTLS)) && defined(_WIN32) +#include <winposixtype.h> +#endif + +#ifdef HAVE_LIBGCRYPT +#include <gcrypt.h> +#endif /* HAVE_LIBGCRYPT */ + +#ifdef HAVE_LIBGNUTLS +#include <gnutls/gnutls.h> +#endif /* HAVE_LIBGNUTLS */ + + #include <glib.h> #include "epan.h" #include "epan_dissect.h" @@ -66,6 +79,11 @@ epan_init(const char *plugin_dir, void (*register_all_protocols)(void), report_open_failure_func = report_open_failure; report_read_failure_func = report_read_failure; except_init(); +#ifdef HAVE_LIBGNUTLS + gnutls_global_init(); +#elif defined(HAVE_LIBGCRYPT) + gcry_check_version(NULL); +#endif tvbuff_init(); oid_resolv_init(); tap_init(); @@ -86,6 +104,9 @@ epan_cleanup(void) packet_cleanup(); oid_resolv_cleanup(); tvbuff_cleanup(); +#ifdef HAVE_LIBGNUTLS + gnutls_global_deinit(); +#endif except_deinit(); host_name_lookup_cleanup(); } |