Commit Graph

15 Commits

Author SHA1 Message Date
Pascal Quantin 1b61474d9d CMake: include CheckFunctionExists in FindKERBEROS.cmake 2021-08-10 17:46:40 +02:00
Stefan Metzmacher 94ac641efa packet-kerberos: implement PAC Ticket checksum verification
We use some private functions from MIT kerberos:
- krb5_free_enc_tkt_part()
- decode_krb5_enc_tkt_part()
- encode_krb5_enc_tkt_part()
but we already do that for krb5int_c_mandatory_cksumtype(),
which is newer than the above functions.

We use all of them only under HAVE_KRB5_PAC_VERIFY,
so we don't seem to need additional configure tests.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2021-07-15 04:52:30 +00:00
Stefan Metzmacher 738e73a50e packet-kerberos: add support for decrypting KRB5 FAST messages
Currently this is only available for MIT Kerberos, but it
should be possible to implement the same using
krb5_crypto_fx_cf2() from Heimdal.

Change-Id: Ic3327dfde770f9345485bf97e2ac6045b909b64e
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/36472
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-26 11:42:42 +00:00
Gerald Combs c227279d33 packet-kerberos: try to fix the build on macOS 10.14
/usr/lib/libkrb5.dylib doesn't have krb5_pac_verify().

This hopefully fixes the build problem introduced by commit
d9aab840a7

Change-Id: Ib354a59cbc20c6bf97ddc029d8b042d4aea6dae9
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/35713
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-10 02:44:38 +00:00
Gerald Combs 2b52ca1890 Windows: Upgrade Kerberos to 1.17.
Recent versions of Kerberos are much easier to compile on Windows. Switch
to version 1.17, compiled with Visual Studio 2017 and linked with the
Universal CRT.

Change-Id: I393d51666cd13255ee1419f2164d7fa59fe1c5cb
Reviewed-on: https://code.wireshark.org/review/31919
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-06 20:07:27 +00:00
Guy Harris 6eecb31030 Fix up handling of the Kerberos package.
On Ubuntu 16.04, and possibly other versions of Ubuntu, and on Debian
and other Debian derivatives, packages for MIT and Heimdal Kerberos can
both be installed at the same time - including developer packages.
Collisions between headers and libraries are handled by putting them in
subdirectories of the system include and library directory and having
their .pc files add -isystem flags to point to the appropriate include
directory and -L flags to point to the appropriate library directory.

CMake's pkg-config support, however, only looks for -I flags, not
-isystem flags, in pkg-config output (using --cflags-only-I), so it
doesn't get the directory in which to look for the headers, and just
uses the results of --libs-only-l to get a list of library names and
does nothing with the results of --libs-only-L, causing it not to look
for libraries in the directory in which to look for the libraries.

We fix this by:

If FindKERBEROS.cmake found Kerberos with pkg-config, have it set
KERBEROS_DEFINITIONS to the "other" compiler flags, which includes the
-isystem flag.

For all packages, adding the <PACKAGE>_DEFINITIONS values to
CMAKE_C_FLAGS and CMAKE_CXX_FLAGS so that they're used when compiling.

If FindKERBEROS.cmake found Kerberos with pkg-config, having it search
for each of the libraries in KERBEROS_LIBRARIES using find_library()
with KERBEROS_LIBDIR and KERBEROS_LIBRARY_DIRS as hints, and
re-assembling the resulting full paths into KERBEROS_LIBRARIES.

Change-Id: Ie18b56b76934f542bd12dc737631c0190026d18a
Reviewed-on: https://code.wireshark.org/review/27071
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-22 03:04:19 +00:00
Graham Bloice bab9abfb7d CMake: Clean up Windows build
Remove options that aren't supported on Windows
Don't use pkgconfig on Windows

Change-Id: I79718a1c43f56a9ec88f690490931b80b727dd68
Reviewed-on: https://code.wireshark.org/review/24481
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-18 20:58:31 +00:00
Peter Wu 01f82ee84c cmake: fix kerberos library lookup, support Heimdal
A build with the gold linker broke with:

    run/libwireshark.so.0.0.0: error: undefined reference to 'krb5_c_decrypt'

Fix this my restructuring the FindKERBEROS module to use the libraries
found by pkg-config.

While at it, check for MIT and Heimdal instead of assuming MIT. Remove
HAVE_KEYTYPE_ARCFOUR_56 as this macro is not used.

Change-Id: Iab23d79bc3f25e9c0fd7203b6f050f875fb4a2b5
Reviewed-on: https://code.wireshark.org/review/10907
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-13 07:36:30 +00:00
Gerald Combs a988253fef CMake: Copy libwireshark dependent DLLs to the target directory.
Add a "copy_cli_dlls" target which copies the DLLs required to run our
command line programs to the run directory.

Fix the spelling of "KERBEROS". Start filling in variables so that we
can populate config.nsh.

Change-Id: I9b3ed912dfbffecbf09f2893efa2c9d82e709521
Reviewed-on: https://code.wireshark.org/review/6513
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-13 19:25:10 +00:00
Graham Bloice e7c4241ca8 Fix Windows x64 CMake build
Unfortunately Kerberos for Windows (kfw) has a different lib
name for x86 & x64.  Fix FindKERBEROS.cmake to check for both
lib names.

Change-Id: I525df6de099d4e50322226317bda8d93d7a8dd23
Reviewed-on: https://code.wireshark.org/review/6246
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-03 15:45:06 +00:00
Peter Wu 9506909223 cmake: use pkg-config for resolving dependencies
Changes:
 * Fix glib2 search path.
 * Add pkg-config support to CAP, GEOIP, GNUTLS, LUA, PortAudio (API
   19), zlib, kerberos.
 * Add pkg-config support to libnl3, libnl2 and libnl1 (but tested only
   with libnl3).

This makes it easier to do 32-bit builds on 64-bit hosts by just setting
`PKG_CONFIG_LIBDIR`. Due to how HINTS work, it is still fragile though:
missing 32-bit libraries will cause a fallback to 64-bit libraries.

A future patch could check for `<PREFIX>_FOUND` and remove the manual
`find_path` and `find_library` hackery since the paths are already
known.

Change-Id: Ieb4fb74695c96afb1a4c70168e84abb1fa4612c6
Reviewed-on: https://code.wireshark.org/review/4292
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-01 08:14:34 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Jörg Mayer d456079b7e Beginnings of win cmake support (not yet working), created by Graham Bloice,
some smaller changes by me.
- README.cmake
  Document how to (one day) run on Windows
- CMakeLists.txt
  Use MSVC compiler flags for MSVC instead of gcc flags
- FindWSWinLibs.cmake
  New: Creates HINTS for finding includes and libraries
  inside the Wireshark support library installation.
- FindXXX.cmake
  Make use of HINTS generated by FindWSWinLibs.cmake

This has not really been tested on Windows as my installation seems to have
automagically downloaded some fixes and is in an inconsistent state since.
Will probably need to reinstall.

svn path=/trunk/; revision=52194
2013-09-23 21:45:55 +00:00
Jörg Mayer 878d7246b8 - Add $Id: $ tags
- FindHtmlViewer.cmake: Try to add reading the name of the
  html viewer from the HTML_VIEWER environment variable (untested)

svn path=/trunk/; revision=30104
2009-09-23 19:40:25 +00:00
Jörg Mayer 9250a69a99 Update to add the last missing detection stuff.
Some of it is untested, kerberos is currently a hack.
Apart from that, package detection should be complete.

svn path=/trunk/; revision=29838
2009-09-10 07:04:54 +00:00