Commit Graph

98 Commits

Author SHA1 Message Date
Armin Novak f91590ecbf Fixed bugs detected during scanbuild run 2018-10-17 13:19:33 +02:00
Armin Novak 114abad767 Removed use of strcpy. 2018-08-27 14:34:09 +02:00
Pascal J. Bourguignon 15f2bafeab Cleaned up const char** -> char** for argv, since we definitely do modify the argv!
(we overwrite the password and pin arguments).
This implies changes in the argument parsing tests that now must pass a mutable argv
(copied from the statically declared test argvs).
Some other const inconsistency have been dealt with too.
2018-06-06 16:43:09 +02:00
Kyle Evans f8c391876f Pull in the LibreSSL compatibility patches from FreeBSD 2018-05-01 08:43:36 -05:00
Armin Novak d249335708 Removed winpr_exit
As the cleanup functions are called by atexit a dedicated
cleanup call is no longer required.
2018-04-03 12:56:33 +02:00
Armin Novak 2d58e96dcc Exit main thread with winpr_exit to trigger resource cleanup.
When using pthread_once with destructors they are only called,
if each thread (including the main thread) is exited with pthread_exit.
Introducing winpr_exit as a wrapper for that purpose.
2018-02-12 10:33:02 +01:00
Armin Novak 4eb5b8e349 Replaced atoi 2017-11-15 15:52:16 +01:00
Bernhard Miklautz 3626676ac6 winpr/makecert: fix linking against libcrypto
Use OPENSSL_CRYPTO_LIBRARIES instead of linking against crypto directly.
2017-09-23 14:13:39 +02:00
Armin Novak 7e32e90d4c Fixed RSA generation for OpenSSL >= 1.1 2017-08-17 13:16:32 +02:00
Mike Gabriel dc075fb133 Fix warning in man pages
"warning: can't find macro file `www.tmac))'""`"
2017-08-03 08:41:50 +02:00
Mike Gabriel c045bddf3f Fix typos in some error messages 2017-08-03 08:38:05 +02:00
Valery Kartel 9bf9ff9e8a Fix build with LibreSSL 2017-07-26 17:12:14 +03:00
Armin Novak 0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
Armin Novak 4be62f7047 Fixed OpenSSL 1.1 no legacy compile issues. 2017-04-06 11:25:25 +02:00
Armin Novak 09d43a66f4 Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
Martin Fleisz c2eacd3b31 Build: Use correct pdb names when installing with symbols 2017-01-31 13:32:51 +01:00
Bernhard Miklautz 2a6bac64ae Fix typos in man pages. 2017-01-17 13:25:47 +01:00
Bernhard Miklautz d817469b78 Install man pages
* man pages are only build/installed if WITH_MANPAGES is enabled
* create a new cmake function install_freerdp_man to unified install man
  pages
* install all man pages using the new function
* update the nightly packages accordingly
2017-01-16 11:34:32 +01:00
Bernhard Miklautz 84b542ec85 winpr-makecert: add initial man page 2017-01-16 11:11:59 +01:00
Bernhard Miklautz 8aeb9df0f5 makecert: fix a regression with > 2048 bit
When certificates with more than 2048 bits were generated and written to
file the read function used a erroneous calculated length causing the
used buffer to overflow.
2017-01-16 11:11:59 +01:00
Bernhard Miklautz 960f4644cd winpr-makecert: use sha256 and update command line
* use sha256 instead of sha1 as default hash algorithm
* fix command line parser
* mark not implemented command line switches as unsupported
2017-01-16 11:11:59 +01:00
Bernhard Miklautz 2f93c0f452 winpr-hash: cleanup cmd line and add man page
* add a initial man page
* clean up the command line a little bit (basically error messages)
2017-01-16 11:11:59 +01:00
Bernhard Miklautz bbb6bf6b43 Include major version number in library names
Currently it is not possible to cleanly install multiple major version
of FreeRDP concurrently as some of the development libraries (.so files)
files can conflict.

This change renames all libraries to include the major version number in
the library name to fix this limitation.

The list of changed libraries:

libwinpr-tools.so -> libwinpr-tools2.so
libwinpr.so -> libwinpr2.so
libfreerdp.so -> libfreerdp2.so
libfreerdp-client.so -> libfreerdp-client2.so
libfreerdp-shadow.so -> libfreerdp-shadow2.so
libfreerdp-server.so ->  libfreerdp-server2.so
libfreerdp-shadow-subsystem.so -> libfreerdp-shadow-subsystem2.so
libuwac.so -> libuwac0.so

As the library names have changed, projects that use FreeRDP will need to
update their dependencies. -
If pkg-config or cmake find modules are used, reconfiguration might be
sufficient.

Fixes #3460
2017-01-16 11:11:58 +01:00
Martin Fleisz ac090520c3 Fix compilation with OpenSSL 1.1.0 using MSVC 2017-01-09 16:43:28 +01:00
Norbert Federa f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Bernhard Miklautz 59fbfdb24b Add library libwinpr-tools
libwinpr-tools is a replacement for winpr-makecert-tool.a. Currently
it's basically the same as winpr-makecert-tool.a but in future
functionality that doesn't fit directly in winpr will be added here.
2016-05-03 14:42:08 +02:00
Bernhard Miklautz 9e8c6c99b6 First shot on fixing over linking
If a target is linked against libraries with cmake
(target_link_libraries) and the libraries are not marked as PRIVATE
they are "exported" and in case a other target is linked against this
target it is also linked against *all* (not private) libraries.

Without declaring private libraries PRIVATE a lot of over linking
(linking against unneeded libraries) was done.
2016-03-29 18:14:34 +02:00
Bernhard Miklautz 79707cb7fd makecert: fix installation of .a file
Since cb958ba9c6  libwinpr-makecert-tool.a
wasn't installed anymore.
2015-12-16 17:45:59 +01:00
Armin Novak 6ed43cd6ec Updated pdb file locations.
Now supporting generators NMake and Visual Studio.
2015-12-15 12:08:35 +01:00
Armin Novak cb958ba9c6 Added pdb files to package target.
Fixed name collision with freerdp-shadow targets.
2015-12-15 12:07:21 +01:00
Armin Novak e223684fcb args arrays static.
When creating static builds the args arrays collided due
to global visibility.
2015-12-15 12:07:21 +01:00
Marc-André Moreau 87780a850d Merge branch 'master' of github.com:FreeRDP/FreeRDP into mbedtls 2015-10-09 15:58:50 -04:00
Marc-André Moreau 54292f29ea libwinpr-crypto: add generic cipher API with OpenSSL/mbedtls support 2015-10-09 12:15:31 -04:00
Marc-André Moreau 94a2f9533e winpr: start porting to non-OpenSSL 2015-10-05 16:23:44 -04:00
Martin Fleisz 899d0874b8 makecert: Remove key usage attribute
The original makecert tool won't add this tribute to a generated
certificate. Adding this attribute might cause problems when using the
certificate with other apps (i.e. Qt SSL).
2015-09-07 10:43:19 +02:00
Armin Novak d557690426 x509_get_default_name tries to get FQDN before hostname now. 2015-08-25 17:44:03 +02:00
Martin Fleisz 1a6aba0130 winpr/tools: Fixed x509_get_default_name failing with long computer names 2015-07-15 11:47:01 +02:00
Norbert Federa 1c43a6e115 Merge pull request #2738 from bmiklautz/ffuncs
hardening: check fread and fwrite return values
2015-07-01 13:02:32 +02:00
Martin Fleisz d64195d46a makecert: Fix incorrect return value check 2015-06-30 08:14:28 +02:00
Martin Fleisz 15473557da makecert: Formatting 2015-06-29 18:10:59 +02:00
Martin Fleisz bdf02d631e makecert: Add strdup checks 2015-06-29 18:07:26 +02:00
Martin Fleisz 5632773808 makecert: Fix double free crashes 2015-06-29 17:49:13 +02:00
Bernhard Miklautz 1cee185e3c hardening: check fread and fwrite return values 2015-06-26 20:38:30 +02:00
Bernhard Miklautz af81a91ea7 windows: fix compilation and warnings 2015-06-22 19:31:25 +02:00
Bernhard Miklautz 06502e6a91 misc: integrate pull request feedback 2015-06-22 19:24:30 +02:00
David FORT 7c3f8f33ab Fixes for malloc / calloc + other fixes
This patch contains:

* checks for malloc return value + treat callers;
* modified malloc() + ZeroMemory() to calloc();
* misc fixes of micro errors seen during the code audit:
** some invalid checks in gcc.c, also there were some possible
integer overflow. This is interesting because at the end the data are parsed
and freed directly, so it's a vulnerability in some kind of dead code (at least
useless);
** fixed usage of GetComputerNameExA with just one call, when 2 were used
in misc places. According to MSDN GetComputerNameA() is supposed to return
an error when called with NULL;
** there were a bug in the command line parsing of shadow;
** in freerdp_dynamic_channel_collection_add() the size of array was multiplied
by 4 instead of 2 on resize
2015-06-22 19:21:47 +02:00
Bernhard Miklautz bf73f4e4f1 Fix unchecked strdups
* add missing checks
* adapt function return values where necessary
* add initial test for settings
2015-06-22 19:09:59 +02:00
Norbert Federa 1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +02:00
Bernhard Miklautz 12e1d94567 winpr: fixes and cleanup
Integrated notes and issues for the pending pull request
* wf_info:
 * cleanup: remove unnecessary breaks
 * fix typo
 * change usage of calloc
* print.c: fix incorrect check
* makecert.c: cleanup includes
2015-04-08 11:34:37 +02:00
Bernhard Miklautz 850de59b55 winpr: add checks for *alloc
Add missing checks if memory allocation was successful. Also adapt
caller(s) when possible.
2015-04-08 11:34:37 +02:00