Commit Graph

286 Commits

Author SHA1 Message Date
Günter Obiltschnig
720dbe1262 #3562: fixed OpenSSL setup/shutdown 2022-04-15 17:22:01 +02:00
Alex Fabijanic
4080ee275a fix(Envelope): mac/clang compile 2022-04-13 19:58:50 +02:00
Alex Fabijanic
e6afb8749c feat(Envelope): Add envelope to crypto #3561 2022-04-13 10:02:05 +00:00
Alex Fabijanic
c4fb51ac72 fix(openssl): pre 3.0 compile 2022-04-09 21:44:11 +02:00
Alex Fabijanic
45c456653f feat(EVP): 3.0 support
- add EVPCipher
- additional EVPPKey constructors
- tests
- fix and improve openssl-related exceptions

Transition towards 3.0 support;
deprecating direct EC and RSA interface portions.
2022-04-09 18:55:26 +00:00
Alex Fabijanic
a2870da1d0 fix(X509Certificate): add missing string format 2022-04-04 10:24:01 +00:00
Alex Fabijanic
063520c8ef Merge branch 'poco-1.11.2' into feat/openssl3-1.11.2 2022-04-04 10:20:56 +00:00
Günter Obiltschnig
b158f90381 disable OpenSSL deprecation warnings 2022-04-02 10:21:55 +02:00
Günter Obiltschnig
753757fdf8 #3525: Bad management of file in case of OpenSSLException in X509Certificate::readPEM and X509Certificate::writePEM 2022-04-02 10:21:37 +02:00
Robin Lee
3bab3548f4
Basic support for OpenSSL 3.0.0 (#3448)
* updated README.md

* Create close-inactive-issues.yml

* check return codes of EVP_CIPHER_CTX_new and EVP_CipherInit

Especially with OpenSSL 3, it is possible that EVP_CipherInit may fail even when
passed a non-null cipher[1]. Without the checking, it will finally get to a
segfault.

[1] https://github.com/openssl/openssl/issues/16864

* Automatically load default and legacy providers with OpenSSL 3

Without the legacy provider [1], some ciphers are not available. For example,
the 'des-ecb' one used by test sutie is missed and the test will fail.

[1] OSSL_PROVIDER-LEGACY(7ossl)

* Make p12 ca order the same as pem

OpenSSL < 3 returns p12 ca order in reversed order. This is fixed
in OpenSSL 3. We work around it with old OpenSSL.

See:
https://github.com/openssl/openssl/issues/16421
https://github.com/openssl/openssl/pull/12641
f5eb85eb0f

* Implement SSL abort handling on OpenSSL 3

On an unexpected EOF, versions before OpenSSL 3.0 returned SSL_ERROR_SYSCALL,
nothing was added to the error stack, and errno was 0. Since OpenSSL 3.0 the
returned error is SSL_ERROR_SSL with a meaningful error on the error stack.[1]

[1] SSL_GET_ERROR(3ossl)

Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com>
Co-authored-by: Robin Lee <cheeselee@fedoraproject.org>
Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
2022-03-29 13:23:44 -05:00
Günter Obiltschnig
2b3662c854 added VS2022 project files 2022-02-19 21:06:24 +01:00
Günter Obiltschnig
6341ec6350 detect ARM64 on Windows 2022-02-19 15:23:03 +01:00
Günter Obiltschnig
516eebad72 #3458: encryptString() crash on redhat/centos 8 with FIPS enabled using md5 default digest 2022-02-07 18:21:46 +01:00
Günter Obiltschnig
625b4116f2 #3448: fix version check 2022-02-07 18:07:57 +01:00
Günter Obiltschnig
11ffdc7807 manually merge #3448, part 1 (Crypto) 2022-02-07 17:00:45 +01:00
Günter Obiltschnig
22eb76d3ae #3302: MSVC: Poco hides warnings (C4996) for the C++14 attribute [[deprecated]] 2021-06-17 18:20:29 +02:00
Günter Obiltschnig
b4ee4b9f30 #3157: fix(openssl): add missing dependency to OpenSSL components 2021-06-15 14:49:38 +02:00
Günter Obiltschnig
f5de69b854 #3260: Memory leak in EVPPKey::loadKey used with files & wrong password 2021-06-15 14:43:21 +02:00
Günter Obiltschnig
aa32399e26 #3307: Poco::Crypto::X509Certificate: obtain certificate fingerprint 2021-06-15 14:36:57 +02:00
Günter Obiltschnig
46ef044d7b #3224: Remove SSL23 support from Poco/Crypto 2021-06-15 13:38:37 +02:00
Günter Obiltschnig
cae2f2dea4 #3230: ECDSADigestEngine: include missing header 2021-04-12 20:36:56 +02:00
Günter Obiltschnig
f18ee10a3c #3027 2021-04-11 17:39:59 +02:00
Günter Obiltschnig
cb1889a007 #3183: fix setPadding 2021-04-11 16:50:25 +02:00
Günter Obiltschnig
4de9a21187 make CMake files style (more) consistent 2020-02-14 11:07:32 +01:00
Günter Obiltschnig
75a86ad868 remove POCO_STATIC 2020-02-12 22:10:01 +01:00
Günter Obiltschnig
bd08e465f8 style 2020-01-24 11:08:30 +01:00
Günter Obiltschnig
a106dcbf80 fixed a warning 2020-01-23 13:29:00 +01:00
Günter Obiltschnig
0f49493d0e remove raw pointer interfaces 2020-01-23 09:50:36 +01:00
Günter Obiltschnig
9350ee13a2 fixed memory leak in testsuite 2020-01-23 09:38:25 +01:00
Günter Obiltschnig
048c4a134c style 2020-01-22 13:52:04 +01:00
Günter Obiltschnig
12db5ff31e
Merge pull request #2871 from siemens/feat/fix-x509-uft8
Add support for utf-8 characters in subject
2020-01-22 13:39:22 +01:00
Günter Obiltschnig
ba0acff719 fixed GH #2743: X509Certificate validFrom expiresOn Date parsing 2020-01-21 20:21:34 +01:00
Günter Obiltschnig
18adb1e43b code cleanup; fix move ctors and assignment 2020-01-21 17:52:43 +01:00
Joerg-Christian Boehme
885c5cbc55 Ignore tests in cmake from cppignore and set POCO_BASE environment. 2020-01-14 21:45:56 +01:00
Günter Obiltschnig
4920df18ce re-generated project files 2020-01-12 23:04:09 +01:00
Günter Obiltschnig
165f5cfd20 re-generated project files 2020-01-11 22:33:28 +01:00
Günter Obiltschnig
4c1e357e4a project file fixes 2020-01-11 12:45:39 +01:00
Günter Obiltschnig
fea390fe6a remove gradle files 2020-01-11 10:04:22 +01:00
Günter Obiltschnig
e84ab92ee0 removed x64 project files 2020-01-11 09:52:49 +01:00
Günter Obiltschnig
fe3f6405b6 updated progen files 2020-01-11 09:34:54 +01:00
Günter Obiltschnig
59898cd3c2 remove old VS project files 2020-01-10 14:26:36 +01:00
Günter Obiltschnig
c82e1c7085 cleanup 2020-01-10 13:47:57 +01:00
Günter Obiltschnig
e1f09a602b cleanup and modernization 2020-01-10 12:20:30 +01:00
Guenter Obiltschnig
d4077125cf replace deprecated OPENSSL_config() 2020-01-09 19:03:54 +00:00
Pascal Bach
435cae1084 Adjust PKCS12 tests to new subject format
The format separator changed from / to ,
2020-01-08 11:11:18 +01:00
Pascal Bach
69a7f53b02 Add support for utf-8 characters in subject
This changes the format produced by OpenSSL from being separated by / to ,
2020-01-08 10:54:01 +01:00
Günter Obiltschnig
9c197e0ed1 finally get rid of std::auto_ptr 2019-12-15 09:40:40 +01:00
Francis ANDRE
e59f37318e Add /MP option and remove /Gm as it is ignored and will be removed 2019-12-07 19:11:24 +01:00
Günter Obiltschnig
a7cbff393e
Merge pull request #2815 from brice-gros/brice.gros/1.10.0+allow-for-cmake-fetchcontent
Make Poco git repository fetchable using CMake's FetchContent
2019-11-25 21:24:16 +01:00
Günter Obiltschnig
acd7ec865b constness fix 2019-11-04 21:03:52 +01:00
Günter Obiltschnig
54413879e8
Merge pull request #2827 from neheb/patch-2
X509Certificate: Get rid of deprecated OpenSSL 1.1 APIs
2019-11-04 20:44:55 +01:00
Rosen Penev
c11d1eebb0 X509Certificate: Get rid of deprecated OpenSSL 1.1 APIs
Added a missing implicit header and added compatibility macros.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-04 11:42:16 -08:00
Rosen Penev
8b0ea3b538 CipherImpl: Fix small error with OpenSSL 1.1
EVP_CIPHER_CTX_cleanup is deprecated in 1.1. Replaced by _reset.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-04 11:39:57 -08:00
Brice Gros
990f7825b5 Fix path to DLLVersion.rc and enable to skip Foundation; Fix Foundation samples referencing useless libs 2019-10-18 15:35:02 +02:00
Joerg-Christian Boehme
b9fa82b08b
CMake merge from devel to 1.10 to use embedded OpenSSL for Windows (#2767)
* Add  embedded openssl for windows
* Add windows fix for OpenSSL #2708
* Fix CppUnit lib prefix with Poco
2019-09-02 11:48:01 +02:00
Günter Obiltschnig
aec24aa4f7
Merge pull request #2766 from dukeru/support_QNX_SDP7
Support qnx sdp7
2019-08-19 08:41:16 +02:00
Günter Obiltschnig
df4cb29ea5 provide OPENSSL_VERSION_PREREQ if not defined by OpenSSL; fix SLPro OpenSSL library names for 64bit 2019-08-16 22:30:19 +02:00
Günter Obiltschnig
3c3bc44d3f fixed warnings 2019-08-14 20:26:34 +02:00
Dooeui
e251479dde Fix build errors in QNX SDP7
Because QNX SDP7 doesn't have separate "dl" library but it's include din "C" library. Therefore, -ldl option should not be used to build programs for QNX SDP7.
2019-08-11 16:58:47 +09:00
Günter Obiltschnig
dfb29ad296 fix for OpenSSL 1.1.0 2019-08-04 15:14:06 +02:00
Günter Obiltschnig
6c828018df added JWT library 2019-07-30 11:19:49 +02:00
Günter Obiltschnig
9a8ab0858f include version resource in DLLs built with CMake 2019-06-24 15:39:06 +02:00
Günter Obiltschnig
27335031e1 fixed GH #2380: Calling Poco::Net::X509Certificate::addChainCertificate() leads to double free. 2019-06-22 18:11:05 +02:00
Transporter
edb8bed56d Copy of pr #2694 for poco-1.10.0 including fix for #2718 2019-06-12 14:10:21 +02:00
Günter Obiltschnig
70c6e33419 fixed GH #2583: Crypto library does not build with OpenSSL 1.0.0 2019-01-17 18:47:24 +01:00
Francis ANDRE
95832355ff Fix PATH 2018-10-05 17:54:29 +02:00
Francis ANDRE
28d4e21c96 Fix typo 2018-10-05 15:32:45 +02:00
Francis ANDRE
3e242f741a Fix update PATH with the TestApp directoy for ProcessTest 2018-10-05 15:31:16 +02:00
Günter Obiltschnig
66fafef3e4 fix SLPro OpenSSL auto linking for POCO_DLL 2018-08-17 18:26:03 +02:00
Günter Obiltschnig
e6b5288735 add support for auto-linking SLpro or OpenSSL default build OpenSSL libs 2018-08-15 08:39:48 +02:00
Francis ANDRE
5dbb9cc3de Regenerating VisualStudio projects 2018-06-20 09:47:40 +02:00
Francis ANDRE
b7330492e5 Add <TargetMachine>MachineX64</TargetMachine> on <Lib> element 2018-06-15 14:28:43 +02:00
Francis ANDRE
19eecbaafb Remove WinTestRunner 2018-06-10 19:46:19 +02:00
Joerg-Christian Boehme
612f092235 Cleanup cmake build system to use transitive dependency management from cmake (#2321)
* Some cleanup in the root CMakeLists.txt

* Cleanup cmake targets

* Add find openssl modul for older cmake version

* Set proper scope

* Change crypto default to off

* Fix openssl default to on

* Remove global setting of C99 standard

* Set from C11 to C99

* Fix for NetSSL win build

* Set C99 compile features

* Fix Windows build

* Fix windows build

* Cleanup poco unbundle definition

* Fix PDF build

* Remove unused set affinity

* Add _CRT_SECURE_NO_WARNINGS as target compile definitions

* Add _AFXDLL as target compile definitions

* Remove commented out line

* 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

* Use cmake property to build shared libs

* Cleanup POCO_NO_AUTOMATIC_LIBS. Set only for Windows in cmake build system

* cleanup LIB_MODE_DEFINITIONS in cmake buld system

* Add POCO_STATIC for CppUnit

* Cleanup target link libraries and add option dependencies.

* Add dependencies management in cmake

* Update cmake documentation

* Squashed commit of the following:

commit 38c233f93fc8e9ad6e24d686c905eb18c86e19a7

    Fix "invalid new-expression of abstract class type ApacheServerRequest" (#2231)

    - abstract method "bool secure() const" defined in HTTPServerRequest was implemented in ApacheServerRequest, one of its derived classes
     - a ap_log_error had one of its parameters changed for fixing a warning "passing NULL to non-pointer argument"
     - minor indentation problems corrected

commit 4cbdfbe828943871618172f9e042176f115d61d8

    Fix build dependencies

* Improve database cmake build dependencies

* Update doc

* Update doc

* Update cmake build commands

* Set public on target link libraries in cmake build system

* Fix PostgreSQL build

* Fix PostgreSQL build in cmake

* Fix PostgreSQL from SQL to Data

* Squashed commit of the following:

commit 1ba7d5dcbfb8d07860dd4efda33b31bedf6184c4

    Add missing cmake file

* Set path to PostgresSQL in AppVoyer

* Try to fix AppVeyor build

* show dir in appvoyer

* Disable PostgreSQL build on Appvoyer

* Refactor add_definitions to target_compile_definitions
2018-06-03 11:17:50 -05:00
Francis ANDRE
4f30644d3d Fix WinTestRunner include base path 2018-06-01 07:43:44 +02:00
Francis ANDRE
4c22b871ae Use CppUnit as a Poco module: regenerate all VS projects 2018-05-28 23:29:12 +02:00
Francis ANDRE
3d2944b3cf Add Poco as prefix of CppUnit import libs 2018-05-28 19:59:15 +02:00
Francis ANDRE
db5d570f33 Add Poco as prefix of CppUnit import libs 2018-05-28 19:58:05 +02:00
Francis ANDRE
be79688077 Use PocoCppUnit instead of CppUnit 2018-05-25 14:05:00 +02:00
Alex Fabijanic
55e56b668d data fixes (getters constness, string any handling) 2018-05-07 15:23:19 +00:00
zosrothko
960ecb38f0 Poco 1.9.1 assert true (#2255)
* Rename assert by assertTrue

* Update submodules

* Missing assertTrue

* Rename poco_assertTrue to poco_assert

* Rename poco_assertTrue to poco_assert
2018-03-29 11:12:54 -06:00
zosrothko
22976b8eb7 Remove linklib for ssl & crypto 2018-03-25 20:36:52 +02:00
Günter Obiltschnig
df1caff144 regen project files 2018-03-07 10:25:19 +01:00
Günter Obiltschnig
826dc92fda style and doc fixes 2018-03-06 23:13:07 +01:00
Günter Obiltschnig
e7d2b4593a fix for OpenSSL 1.0 2018-03-06 22:58:14 +01:00
Günter Obiltschnig
943595c937 GH #2129: Add support for AES-GCM ciphers 2018-03-06 22:53:27 +01:00
Günter Obiltschnig
e19f33351d add additional cipher modes 2018-03-06 19:46:24 +01:00
Alex Fabijanic
20f9320f2d RSAKeyImpl #2201 2018-03-05 20:12:31 -06:00
Joerg-Christian Boehme
9feabc7723 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-02-26 18:54:40 -06:00
Aleksandar Fabijanic
c8c6662069
fix osx clang compile 2018-01-31 13:10:58 -06:00
Aleksandar Fabijanic
a4c744fdba
fix #endif comment 2018-01-29 18:43:25 -06:00
Alex Fabijanic
8f2ecfccef openssl VS projects modifications 2018-01-29 09:22:45 -06:00
Aleksandar Fabijanic
6cdf579b48
fix name case 2017-11-16 22:27:16 -06:00
Aleksandar Fabijanic
860975b372
Fix EVPTest on RHEL/Fedora by removing hard-coded EC curve name (#2002) 2017-11-15 20:35:25 -06:00
Guenter Obiltschnig
c672c14e5a remove duplicate files and remaining Id headers 2017-11-10 09:26:24 +01:00
Guenter Obiltschnig
4bb54690d0 removed openssl_ver script 2017-11-09 16:25:43 +01:00
zosrothko
f2e58c17e8 Add Gradle build scripts. 2017-10-31 09:07:53 +01:00
Bjoe
3ddda2f163 Add missing std:: namespace (#1946) 2017-10-18 16:15:20 -05:00
Alex Fabijanic
210bc6d30c add X509 version, serialNumber and signatureAlgorithm 2017-09-29 18:20:10 -05:00
Alex Fabijanic
4c4de6b7fb add PKCS12 CA-cert friendly names extraction 2017-09-28 20:50:30 -05:00