Commit Graph

203 Commits

Author SHA1 Message Date
Günter Obiltschnig
bd0235b4b0 include version resource in DLLs built with CMake 2019-06-24 15:42:23 +02:00
Günter Obiltschnig
d38f7e2289 fixed GH #2380: Calling Poco::Net::X509Certificate::addChainCertificate() leads to double free. 2019-06-22 18:13:16 +02:00
Transporter
8df1be140a The changes to pr #1733 were reversed by commits 8da67be and b1715f9. 8da67be cleared the check for static OpenSSL libraries, then b1715f9 cleared the rest. When using static OpenSSL libraries, all required dependencies (ws2_32.lib, Crypt32.lib) must be linked from the dependent projects. CMake provides the OPENSSL_USE_STATIC_LIBS switch (https://cmake.org/cmake/help/latest/module/FindOpenSSL.html) for static OpenSSL. 2019-05-13 16:26:50 +02:00
Transporter
4f5c8e2ec2 Bugfix: OpenSSL 1.1.0+ have changed library names in windows 2019-05-13 15:32:30 +02:00
Günter Obiltschnig
98d4e9bda7 fixed GH #2583: Crypto library does not build with OpenSSL 1.0.0 2019-01-17 18:50:53 +01:00
Joerg-Christian Boehme
b1715f90b2 Fix ctest execution in AppVeyor (#2514)
* Test

* Fix execution of ctest in AppVeyor

* Revert "Test"

This reverts commit d50863c1da1757d15e8e9d058cd5a887dabfcd38.

* Use internal/embedded openssl on windows

* Fix apache connector build findings

* Fix appveyor

* Use openssl embedded for windows

* Improve windows embedded openssl checkout

* Test openssl embedded cmake

* Cleanup cmake

* Switch of NetSSLWin. Needs to fix

* Fix copy of embedded openssl

* Fix set correct windows path environment

* Remove path environment for windows

* Comment out AsyncChannel test on windows. Its chrashing

* Commont out async test

* Commont in async test

* Add ChannelTest::testAsync to cppunit ignore

* Remove CppUnit ignore for testasync

* Fix NetSSL_WIN test

* Improve travis script

* Fix source path in travis cmake build

* Fix travis cmake build

* Fix cmake source path in travis

* Change to ninja for faster build

* Fix test from cmake build
2019-01-02 10:40:40 -06:00
Lyashenko Arsenii Maksimovich
223ce277bd Fix "redeclared without dllimport attribute..." warning for MinGW (#2433)
* Fix "redeclared without dllimport attribute..." warning for MinGW

* Use 'POCO_COMPILER_MSVC' instead of '_MSC_VER'.

* Define 'POCO_COMPILER_MINGW' with 'POCO_COMPILER_GCC' too

* Define 'POCO_UNUSED' for Clang too
2018-09-17 20:36:21 +02:00
Günter Obiltschnig
dd8df3f6ac fix SLPro OpenSSL auto linking for POCO_DLL 2018-08-17 18:26:29 +02:00
Günter Obiltschnig
9d1fce93ac add optional support for SLpro and vanilla OpenSSL autolinking on Windows 2018-08-15 16:14:47 +02:00
Lyashenko Arsenii Maksimovich
0379a1e768 MinGW support (#2360)
* Add MinGW support (not full yet).

TODO list:
* Fix tests compilation (undefined reference to CppUnit::...)
* Fix SQLs compilation (No rule to make target '${LIBNAME}.dll.a', needed by '${LIBNAME}.dll'.  Stop.)
* Fix crypto executables compilation
* Test static compilation
* Test MSVC compilation
* Add unicode support

See pocoproject/poco#2356

* Code rearrange.

Also fix PDF test runner.

TODO list:
* Fix tests compilation (undefined reference to CppUnit::...)
* Add unicode support
* Resolve what to do with message compiler

See pocoproject/poco#2356

* Normal "_DLL" definition for MinGW. Add missing "Crypto_API" for several implementations. Add "POCO_NO_MINGW_UNICODE" for "wmain".

TODO list:
* Check PostgreSQL and MySQL
* Resolve what to do with message compiler

See pocoproject/poco#2356

* Test PostgreSQL. Fix message compiler problem.

See pocoproject/poco#2356

* Perform requested changes. Add WinCE check.

See pocoproject/poco#2360

* Perform requested changes #2. Delete WinCE check.

See pocoproject/poco#2360

* Perform requested changes #3. Net initializer should works now.

See pocoproject/poco#2360

* Fix invalid indent.

See pocoproject/poco#2360

* Correct definition of POCO_NO_MINGW_UNICODE.

See pocoproject/poco#2360

* Remove macro and set global linke flags for testing purpose

* Add -municode for mingw where wmain is used

* Delete "POCO_ENABLE_EXE_WMAIN". Add PollSet support.

See pocoproject/poco#2360

* Restore WinCE linker flags. Set _WIN32_WINNT in PollSet.cpp separately. Add var to disable MinGW wmain wrapper.

* Fix compilation.

* Fix missing argument name in functions "setEscapeUnicode" in JSON package.
2018-06-19 08:17:03 -07:00
Yegor Yefremov
6b9054dfa2 cmake: create and install pkg-config files (#2224)
* cmake: create and install pkg-config files

Automatically create and install *.pc files for selected components.

PocoFoundation.pc
PocoNet.pc
PocoUtil.pc
etc.
2018-06-12 20:42:19 +02:00
Joerg-Christian Boehme
8a70ab8a1c Cleanup cmake build system (develop) to use transitive dependency management from cmake (#2322)
* Cleanup cmake Root CMakeLists.txt

* Cleanup cmake targets

* Add find openssl modul for older cmake version

* set proper scope

* Switch off make based builds in travis and appveyor

* Fix build break, set C11 on c file

* Set from C11 to C99

* Fix NetSSL win build

* Set C99 compile features

* Fix Windows build

* Fix windows build

* Revert "Fix windows build"

This reverts commit 678d44216bd964f61655df809efbf63ddd8a7bfd.

* Cleanup poco unbundle definition

* Fix PDF build

* Remove unused set affinity

* Add _AFXDLL as target compile definitions

* Refactor add_definitions to target_compile_definitons in Util

* Refactor add_definitions to target_compile_definitons in XML

* Remove THREADSAFE in data sql cmake build

* Refactor add_definitions to target_compile_definition in cmake mysql

* Refactor add_definitions to target_compile_definition in cmake odbc

* Refactor add_definitions to target_compile_definition in cmake sqlite

* Refactor add_definitions to target_compile_definitions in platform specific cmake

* Add _DEBUG as compile definition

* Add build dependencies between Foundation-testrunner and TestApp, TestLibrary in cmake build

* cleanup LIB_MODE_DEFINITIONS in cmake buld system

* Fix broken merge

* Fix android foundation test

* Fix old redis build version

* Fix android fondation test

* Cleanup target link libraries.

* Update cmake documentation

* Some fixese in crypto and netssl for win and some cleanup an SQL

* Minor fix in root CMakeList.txt

* Squashed commit of the following:

commit df050b56b6d81eaf9bdb37bb016fe9a3554eba4f

    Fix build dependecies in cmake

* Squashed commit of the following:

commit f41ce2bb404e197ff04b1e64f7b66c9a2b1e03c8

    Fix PostgreSQL build

* Squashed commit of the following:

commit b7da0deed67ffff23a8b7a50d6deff1e022b2577

    Set db hostnames

* Update doc

* Update cmake build commands

* Set public on target link libraries in cmake build

* Fix broken cppunit merge
2018-06-03 11:19:00 -05:00
Aleksandar Fabijanic
4efaa99fff Add WeakRefPtr to Foundation #2246 (#2247)
* Logger & Channel classes now using AutoPtr<Channel> instead of Channel* (API improvement)

* fix CachingChannel

* more fixes

* Configuration: remove raw pointers from interfaces #2077

* Add WeakPtr to Foundation #2246

* Add WeakPtr to Foundation #2246 (buildsystems files)

* Add WeakPtr to Foundation #2246 (x64 VS project files)

* backtrace and Event fixes

* add ordered map

* add ordered set

* add sanitize makefiles

* update RefPtr doc

* fix AtomicCounter includes

* add ordered containers tests

* fix xml test compile error

* remove operator bool rom smart pointers

* Poco::strToInt<> fails for values right above the type's boundary / limit #2250

* add g++ -ftrapv config

* remove Version.h includes (now included from Config.h)

* comment out offending SQLite test (TODO)

* add AtomicFlag and SpinlockMutex

* remove RefCountedObject include from RefPtr and WeakRefPtr mutex template param

* add WeakRef SpinLockMutex threading test

* WeakRefPtr, backtrace, NDC, refcount DC fixes

* SQL fixes

* update RCO documentation

* XML/DOM: Remove raw pointers from public interfaces #2075

* few fixes

* PocoDoc - make logger non-static reference member

* remove path char array initialization

* Fix failing unit test, adding d in debug mode for TestApp and TestLibrary

* fix application config pointer

* fix some crypto warnings

* fix Process tests and consolidate TestApp name building

* define PathImpl::selfImpl for WinCE

* restore WinCE test app name extension

* attempt to passify 32 bit clang

* fix failing Active* tests

* Add POCO_OS_ANDROID support for Path::self()

* Add build dependencies between Foundation-testrunner and TestApp, TestLibrary in cmake build

* Remove to set LD_LIBRARY_PATH on foundation test

* revert to develop XML

* fix VS150 env not found (hardcode it)

* undef min/max
2018-05-02 16:04:39 -06:00
zosrothko
b3d107de94 Replace assert by assertTrue (#2242)
* Update Nuget packaging

* Split a single Nuget package into 2: x86/x64 because its size is greater
than 250Mb, which is the upper limit of Bintray

* CppUnit/Test.h: Rename assert by assertTrue

* Restore poco_assert

* leave old assert for backward compatibility

* add undef

* remove whitespace

* Display PocoDic.ini

* Fix CppUnit includes path

* Delete TestCaller.h

* Create dependencies
2018-03-26 06:56:33 -06:00
Timothy Brackett
43cbd82b7f Fix #1241 Rename CMAKE Variables to allow grouping (#1437)
* Add macro to map ENABLE_* variables provided on CMake command-line to POCO_ENABLE_* variables.

* Properly map ENABLE_* values to POCO_ENABLE_* variables instead of assuming ON
2018-03-26 07:13:54 +02:00
Yegor Yefremov
742f4578fc cmake: use the standard CMake flag to drive the shared object build (#2057)
* cmake: use the standard CMake flag to drive the shared object build

* Add deprecated warning and build always shared test library
2018-03-12 20:15:24 +01:00
Joerg-Christian Boehme
d90dca6865 Improve cmake build to find openssl and fix windows build (#2120)
* Improve cmake build. Use cmake to find openssl and set proper dependencies to internal openssl.
2018-03-11 22:17:21 +01:00
Günter Obiltschnig
da8ad649ae merge GCM fixes from 1.9 2018-03-06 23:12:08 +01:00
Alex Fabijanic
948e8950a3 RSAKeyImpl #2201 2018-03-05 20:04:25 -06:00
Joerg-Christian Boehme
a834aad0b1 Add android build on travis (#1981)
* Add build for android in travis CI.

* Fix review findings. Change from __ANDORID__ to POCO_ANDROID

* Add android test

* Fix compile issue after rebase

* Ignore test big ping when its failing
2018-03-05 22:02:40 +01:00
Aleksandar Fabijanic
19a1c5205e fix endif comment 2018-02-21 14:00:24 -06:00
Tobias Taschner
2a00f6948a Allow building with LibreSSL (#2155)
Building with LibreSSL defines a higher OpenSSL version but does not
provide some of the newer symbols. The necessary alternative code
is already available in the Poco code base and just needs additional
precompiler checks.
2018-02-14 11:12:21 -06:00
zosrothko
5fa3d6094e Backport of pocoproject/feature-gradle to pocoproject/develop (#2127)
* Backport of feature-gradle

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Replace '/' by '\' to comply with DOS path

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Cleanup

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Put environment setting at the Exec task.

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Use standard release

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Updated mkdoc configuration

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Remove lines guarded by POCO_ENABLE_CPP11

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Merge remote-tracking branch 'origin/develop' into develop

* Fix NuGet & Wix input dependencies file set.

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Remaining fixes for Data2SQL switch.

* Use $global:LastExitCode instead of a local LastExitCode
2018-02-09 08:05:15 -06:00
Aleksandar Fabijanic
c5c162135a fix osx clang compile 2018-01-31 13:09:36 -06:00
Alex Fabijanic
23e7a8f0f5 remove double definition; fix cast warning 2018-01-31 09:06:51 -06:00
Aleksandar Fabijanic
27490c6fe0 fix #endif comment 2018-01-29 18:44:04 -06:00
Aleksandar Fabijanic
83287854db port internal openssl changes from 1.8.2 2018-01-29 17:52:06 -06:00
Aleksandar Fabijanic
8b81aea190 port changes for internal openssl from 1.8 2018-01-29 17:50:12 -06:00
Alex Fabijanic
e3e2277171 update VS projects for unified openssl dir name 2018-01-29 10:41:40 -06:00
Alex Fabijanic
1db234a2ab Fix macos build: crypto shoud use public openssl includes #2100 2018-01-19 18:24:58 -06:00
Aleksandar Fabijanic
b49ac67225 Data2sql (#2070)
* remove leftover progen files

* remove Data sources and turn headers into forwards

* add SQL files #2059

* Data2sql: adjust Travis, AppVeyor & Makefiles (#2069)

* Replace Data by SQL

* Replace Data by SQL

* Replace Data by SQL

* Replace Data by SQL

* fix header forwarding

* Data2sql: Fixes for complete Travis CI success (#2071)

* Replace Data by SQL

* Replace Data by SQL

* Replace Data by SQL

* Replace Data by SQL

* Replace Data by SQL

* Restore DataFormatException

* Replace Data by SQL

* Replace Data by SQL

* Replace Data by SQL

* Replace Data by SQL

* construct RowFilter from RecordSet reference instead of pointer

* pass Container ref instead of ptr to Column

* elimitate g++ warnings

* SQL: remove raw pointers from interfaces #2094; add constness and move ops where appropriate

* tidy up Postgres

* ODBC fixes
2018-01-18 11:29:28 -06:00
Scott Talbert
d962ffc81b Fix EVPTest on RHEL/Fedora by removing hard-coded EC curve name (#2002)
RHEL/Fedora seem to have a much more limited set of EC curves available by
default.  This change will instead use the first curve name as used in other
places.
2017-11-15 20:29:56 -06:00
Aleksandar Fabijanic
151304135e purge trailing whitespace (#1947) 2017-10-20 15:37:19 -05:00
Alex Fabijanic
c31af5d369 Move to standard integer types #1147 2017-10-05 18:35:59 -05:00
Alex Fabijanic
2e9aecb160 eliminate VS implicit conversion warnings 2017-10-05 18:25:08 -05:00
Alex Fabijanic
8da67bee26 add internal OpenSSL option to cmake 2017-10-03 22:31:29 -05:00
Alex Fabijanic
6e69babf2e add some elliptic curve utility functions 2017-09-29 20:51:12 -05:00
Alex Fabijanic
9bf32f1e81 add script to print system openssl version 2017-09-29 17:44:09 -05:00
Alex Fabijanic
4e4fed8965 ifdef signature algorithm for older openssl versions 2017-09-29 14:55:29 -05:00
Alex Fabijanic
6121d55819 add X509 version, serialNumber and signatureAlgorithm 2017-09-29 13:45:56 -05:00
Alex Fabijanic
767853a44a cleanup some utility code 2017-09-28 21:53:33 -05:00
Alex Fabijanic
43ee77f315 add PKCS12 CA-cert friendly names extraction 2017-09-28 20:32:41 -05:00
Alex Fabijanic
3c9c79780a fix array init 2017-09-28 15:21:11 -05:00
Alex Fabijanic
528b5d615a fix incomplete EC key creation from curve name; make sure tests use curves that exist; add validation checks on EC key creation 2017-09-28 15:17:15 -05:00
Alex Fabijanic
378548fc33 backport changes from 1.8 branch 2017-09-27 22:27:21 -05:00
Alex Fabijanic
b014fa429f read/write list of X509 certificates 2017-09-26 22:16:37 -05:00
Alex Fabijanic
9ac76b4943 fix PKCS12 move constructor 2017-09-26 15:32:59 -05:00
Alex Fabijanic
ddbe53e1d0 EVPPKey == operator; PKCS12 copy/move 2017-09-26 14:40:04 -05:00
Alex Fabijanic
06335ae2ae make all save() functions const 2017-09-26 12:00:46 -05:00
Alex Fabijanic
01f90c7632 always init CipherKey digest pointer 2017-09-26 11:43:59 -05:00