Commit Graph

5632 Commits

Author SHA1 Message Date
Günter Obiltschnig
0bf69ab832 fix haveLegacyProvider for OpenSSL < 3 2023-07-11 07:00:35 +02:00
Günter Obiltschnig
b0d7f9bd79 style 2023-07-11 06:47:40 +02:00
Günter Obiltschnig
6356cd22ad
Merge pull request #4027 from Crafty-Codes/fix/function-parameter
CppParser: fix for std::function<void()> parameter
2023-07-11 06:42:56 +02:00
Günter Obiltschnig
a467fb382d #4031: Classes with virtual functions missing virtual destructors (compilation issues) 2023-07-10 22:08:59 +02:00
Günter Obiltschnig
5f17a02548 #3935: The extractor in postgresql drops milliseconds 2023-07-10 21:52:36 +02:00
Günter Obiltschnig
00e157da43 #4014: wrong string offset in HTTPCredentials::isNTLMCredentials 2023-07-10 21:37:45 +02:00
Günter Obiltschnig
15c6631352 #4078: Upgrade bundled SQLite to 3.42 2023-07-10 21:28:24 +02:00
Günter Obiltschnig
64b5a91ca1 #4071: PageCompiler: add referrerPolicy to page directive 2023-07-10 21:27:24 +02:00
Günter Obiltschnig
4c1e83b8e8 Don't throw if OpenSSL legacy provider is not available. Add OpenSSLInitializer::haveLegacyProvider() to check for legacy provider. 2023-07-10 17:02:49 +02:00
Fabio Oberhofer
f6e2524db6 CppParser: fix for std::function<void()> parameter
The parameter was previously seen as a function because of it's
brackets.
2023-07-03 14:16:22 +02:00
micheleselea
ead93baadf
EVPPKey constructor for modulus/exponent (#4025)
* Create EVPPkey from modulus and exponent

Add constructor for creating EVPPkey (RSA) using modulus and exponent

* Add EVPPKey constructor for modulus/exponent

* Add testEVPKeyByModulus

* fix test for mudulus

* Update EVPTest.cpp
2023-06-20 22:46:43 -05:00
Günter Obiltschnig
ade5f83973 recreated project files 2023-06-12 17:42:57 +02:00
Günter Obiltschnig
67d0c05370
Merge pull request #4050 from stkw0/devel
rename arc -> poco_arc
2023-06-12 16:36:48 +02:00
David Roman
922fb39787 rename arc -> poco_arc
Fix #3349
2023-06-12 16:28:20 +02:00
Günter Obiltschnig
a00bfbe89f #4057: ODBC: SQL Anywhere Support (fix) 2023-06-11 09:59:49 +02:00
Stefan Csomor
b391d86502
switching to 64 bit arch for simulator as well (#3009) 2023-06-10 18:13:01 -05:00
Alexander Kernozhitsky
c6fd0db4b6
Fix thread counter leak (#3992)
Cherry-picked from https://github.com/ClickHouse/poco/pull/28, see the
mentioned PR for more details.

Co-authored-by: alexey-milovidov <milovidov@yandex-team.ru>
2023-06-09 22:05:19 -05:00
Günter Obiltschnig
2a6434a86d Merge branch 'devel' of github.com:pocoproject/poco into devel 2023-06-06 13:13:11 +02:00
Günter Obiltschnig
0a4f64c8d2 #3876, also for SystemConfiguration 2023-06-06 13:12:35 +02:00
Günter Obiltschnig
525e91cb90
Merge pull request #4030 from bas524/socketaddress-by-const
fix #3968
2023-06-06 13:08:15 +02:00
Günter Obiltschnig
8f764e3505 #3880: NetSSL_OpenSSL: Support session resumption with TLSv1.3 2023-06-06 13:06:02 +02:00
Günter Obiltschnig
a9ad113742
Merge pull request #4038 from sersoftin/fix/win-shared-library-error-text
Fixed Poco::format specifier for error code
2023-05-21 09:43:52 +02:00
Sergey Detsina
ed2613dfc5 Fixed Poco::format specifier for error code 2023-05-21 10:40:20 +03:00
Alexander B
69a6ddbd90 fix #3968 Poco::Net::SocketConnector constructor should take SocketAddress by const reference 2023-05-11 14:39:32 +03:00
Alexander B
75b378e540
fix #4005 Poco::Path::getExtension() returns name of the hidden file if no extension is present (#4011) 2023-05-05 11:49:56 -05:00
Alexander B
c7ac8574f8
Complimentary to #3918 (std::*mutex wrapper) (#3954)
* Complimentary to #3918
I think that we can use Poco::Mutex and Poco::FastMutex as wrappers for std::recursive_mutex and std::mutex instead of replacing

For using std::*mutexes switch on cmake-option POCO_ENABLE_STD_MUTEX

* add define POCO_ENABLE_STD_MUTEX to the Config.h
remove empty if-else from CMakeLists.txt
2023-05-05 09:49:06 -05:00
Matej Kenda
971a7cc670
Mongodb op msg database commands fix (#4004)
* * Fix: MongoDB::OpMsgCursor did not handle zero batch size properly: cursor requests failed.
* Improvement: Add emptyFirstBatch to indicate that the size of the first batch shall be zero for performance to get potential error ASAP from the server.

* Poco::MongoDB: Some database commands do not need collection as an argument. An integer "1" is passed instead.
2023-05-05 09:27:42 -05:00
Matej Kenda
9a2c16f55a
MongoDB: add missing name accessor to get database name. (#4020) 2023-05-05 08:33:21 -05:00
Günter Obiltschnig
dd21b48d05
Merge pull request #3999 from vojinilic/fixDeadLockDestructor
Fix hang in destructor
2023-04-20 10:19:26 +02:00
Vojin Ilic
b8d1792fa0 Fix hang in destructor
Consider following situation. A class owns a timer. In destructor of that class we call .cancel() asynchronous on timer before it's destruction.
Now timer is executing cancel in it's own internal thread, while it's doing that destructor of timer is called from owner's destructor. Timer destructor enqueues stop notification. If that enqueue is happening just after while loop from cancel notification, stop notification is gonna be dropped and timer will never stop.
Fix: Add new method in TimedNotificationQueue which will return a notification regardless of the time it needs to be executed.
Get number of pending tasks in the queue. Flush out that many notifications from queue while taking special consideration of pending Stop and Cancel notifications.
Add test for new method in TimedNotificationQueue and fix cancel all tests to actually check if notification got executed.
fixes #3986
2023-04-04 12:08:49 +02:00
vojinilic
687f9fb2f5
Revert "Fix dead lock on Timer destructor (#3987)" (#3994)
This reverts commit 39a8b9a7c7.

Co-authored-by: Vojin Ilic <vilic@nvidia.com>
2023-04-04 00:34:08 -05:00
vojinilic
39a8b9a7c7
Fix dead lock on Timer destructor (#3987)
Consider following situation. A class owns a timer. In destructor of that class we call .cancel() asynchronous on timer before it's destruction.
Now timer is executing cancel in it's own internal thread, while it's doing that destructor of timer is called from owning class. Timer destructor enqueues stop notification. If that enqueue is happening just after while loop from cancel notification, stop notification is gonna be dropped and timer will never stop.

fixes #3986

Co-authored-by: Vojin Ilic <vilic@nvidia.com>
2023-03-30 05:46:03 -05:00
David Hedbor
4cc956483d
Fix thread compilation issues on FreeBSD (#3989)
- Use pthread_set_name_np on FreeBSD 12.
- Implement currentOsTidImpl() using thr_self() on FreeBSD.
2023-03-30 04:49:04 -05:00
xiao
39a207ce62
Avoid epoll_wait causing the lock to not be released (#3983)
* Avoid epoll_wait causing the lock to not be released.

* code style
2023-03-27 15:48:54 -05:00
Aleksandar Fabijanic
bcae06f423
3808 icmp statistics (#3982)
* fix(ICMPClinet): ICMPEventArgs Statistics bugs #3808

* fix(SpinlockMutex): 100 % CPU usage on single-core system #3852
2023-03-22 09:11:13 -05:00
Anton
93d18162f3
Add ODBC DirectExec public API (#3502)
* ODBC sqlDirectExec

* doc

* Small fix

* Fix tabs, add missing const, fix style

* Add test case

* Small fixes

* suggested fix for async

* test for returned values
2023-03-22 00:51:57 -05:00
Matej Kenda
3838070146
Resolves #3484: support for OP_MSG in Poco::MongoDB (#3902)
* Binary writer/reader: add writeCString and readCString.

* MongoDB::Database: add queryBuildInfo and queryServerHello; add WireVersion enum.

* MongoDB: Introduce OpMsgMessage (request and reply) and related changes in Connection, Database, MessageHeader.

* MongoDB: First unit test changes for OpMsgMessage.

* MongoDB::Document: new functions addNewArray and remove.

* MongoDB: OP_MSG unacknowledged write and many improvements

* MongoDB: new cursor using OP_MSG

* MongoDB: bunch of new tests for OP_MSG wire protocol.

* BinaryWriter::WriteCString: use write instead of operator <<.

* MongoDB::OpMsgCursor: Slightly modified prototype code for using moreToCome flag.

* MongoDB: Add OpMsg* files to Makefiles.

* MongoDB: Add OpMsg* files to VS project files.

* Compile fixes.

* MongoDB::Database: Add factory function for database commands createOpMsgMessage() and cursors createOpMsgCursor()
2023-03-20 01:50:15 -05:00
Alex Fabijanic
57a531573f Merge branch 'devel' of https://github.com/pocoproject/poco into devel 2023-03-18 11:25:33 +01:00
cesar
cee8c96146 Added system_error header to SockerProactor for std::error_code references (#3883) 2023-03-18 11:25:07 +01:00
Alexander B
7ab7a5291d
Improve implementation of logging macros. #2331 (#3862)
* Improve implementation of logging macros. #2331

The GNU compiler emits a warning if nested "if" statements are followed by
an "else" statement and braces are not used to explicitly disambiguate the
"else" binding.  This leads to problems with code like:

   if (gate)
     ASSERT_*(condition) << "Some message";

The "switch (0) case 0:" idiom is used to suppress this.

* I was wrong.
do-while better then switch-case approach for "ambiguous else blocker"
https://godbolt.org/z/W5nnYrzx6

* try to fix tabs

* again fix tabs

* again fix tabs

* again fix tabs
2023-03-18 05:21:32 -05:00
Aleksandar Fabijanic
6207b8fb56
fix(devel): add missing 1.11 releases commits (#3976) 2023-03-18 01:29:14 -05:00
Alexander B
3852a6b6c2
Solaris.build fix #3843 and #3643 (#3939)
* try fix compilation for solaris

* this commit for issue #3843 and #3643
changes in Types.h allow ignore problem with declaration of std::int8_t. int8_t can be defined as char or signed char. IMHO we need strong types for Poco::Int's

Envelop.cpp contains initializer for EVP_CIPHER_CTX_init, because this function prototype depends on openssl version.

Application.cpp contains includes especial for SOLARIS, for ioctl support

ClassLoaderTest.cpp and SharedLibraryTest.cpp contains changes because loadlibrary(dlopen) doesn't load library from current directory by default

LocalDateTimeTest.cpp contains changes because SOLARIS use std::tm without tm_gmtoff

* fix : define of SOLARIOS OS in LocalDateTimeTest

* remove unnecessary wrapper

* fix output dir for windows build with multi-config build

* try to fix bug with unixodbc version in linux-builds
[read here](https://github.com/microsoft/linux-package-repositories/issues/36)

* try to fix bug with unixodbc version in linux-builds
[read here](https://github.com/microsoft/linux-package-repositories/issues/36)

* fix : warning in main cmake for if-condition for multi-config build
fix : error for linux-gcc-make-cxx20, use --allow-downgrades for unixodbc

* fix : warning for cmake windows builds
revert changes for linux-gcc-make-cxx20

* revert ci.yml, remove unixodbc version

* try re-run build

---------

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
2023-03-18 01:28:47 -05:00
Andrew Auclair
66e93f98cc
Custom rotate, archive and purge strategies for FileChannel (#3810)
* Adding the ability to set custom rotate, archive and purge strategies.

* Force CI
2023-03-18 01:28:25 -05:00
chrisbednarski
e0e628ac7e
fix(build): fix build with openssl 3.1.0 on vs2022 (#3969)
* fix log verbosity in windows powershell build script

* stop paths being added multiple times to environment variables

* pass useenv property to msbuild

* linking issue: include crypto.h prior to config.h so POCO_EXTERNAL_OPENSSL is initialised

* resolve poco_base path in powershell script

* build against any available windows sdk
2023-03-17 17:45:56 -05:00
Gleb Popov
f6c3017b3e
Do not incur insane stack limit in Foundation-ThreadPool test. (#3861)
This fixes the test on FreeBSD.
2023-03-17 16:09:38 -05:00
MailShop
abd06ab4d9
ODBC: Fix DataFormatException getting Time value from SQL Server (#3802) 2023-03-17 15:51:57 -05:00
gyee-penguin
85f74867ef
Fixed compile error with OpenSSL 1.0 systems (#3739) (#3912) 2023-03-17 15:45:30 -05:00
micheleselea
60faa4fb58
hasMicrosecond is undefined (#3842) 2023-03-17 15:42:41 -05:00
Samuel Thibault
d05d689622
Add GNU Hurd support (#3946)
Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
2023-03-17 15:24:57 -05:00
Conor Burgess
9a374ca2de
Fix error handling with OpenSSL 3.0 in SecureSocketImpl.cpp (#3971) 2023-03-17 10:07:37 -05:00