Commit Graph

882 Commits

Author SHA1 Message Date
Nanang Izzuddin 1dab9b63ac
Add TLS/SSL backend: Windows Schannel (#3867) 2024-05-08 10:25:03 +07:00
Nanang Izzuddin f38d781a82
Fix bad address length check in pj_ioqueue_sendto(). (#3941) 2024-04-29 15:01:38 +07:00
Nanang Izzuddin 478aeb95e9
Fix data race reported by ThreadSanitizer in caching pool (#3897) 2024-03-26 15:20:44 +07:00
Santiago De la Cruz 427a2b3ab8
Add some missing unlocks (#3893) 2024-03-26 11:52:13 +08:00
naf cfde494dc3
Add missing openssl SECLEVEL=0 support (#3890)
Previous SECLEVEL support allowed for levels 1-5.
However, openssl defines levels 0-5. [1]

Recent openssl versions (3.0+) have moved previous
popular ciphers/key lengths (i.e. RSA1024withSHA1)
into level 0, so it is now a reasonable choice to use.

Add support for level 0.

[1] https://www.openssl.org/docs/man3.2/man3/SSL_CTX_set_security_level.html
2024-03-19 15:02:07 +07:00
Nanang Izzuddin beb06a57ca
Fix bad mem access in cancelling a timer, move _timer_id validation earlier. (#3854) 2024-02-07 15:28:32 +07:00
sauwming 712b06407f
Fixed thread leak in Mac OS (#3838) 2024-01-23 09:33:44 +08:00
sauwming d762276861
Fixed deprecation warnings on Mac and iOS (#3837) 2024-01-22 16:26:23 +08:00
Brad Smith 26bdf998f0
Adjust code to support LibreSSL without the ASN1 macros (#3822) 2024-01-09 11:48:33 +08:00
sauwming 033e4d7ae3
Fixed printf format warnings (#3813) 2023-12-27 10:32:32 +08:00
Brad Smith 4140143493
Switch LibreSSL code path to utilizing OpenSSL 1.1 API (#3758) 2023-12-12 12:50:56 +08:00
silentindark c224f26420
Fix warnings (#3778) 2023-11-16 15:30:03 +08:00
Amilcar Ubiera f2da44b720
Fix to uninitialized ssock in ssl_sock_imp_common. (#3742) 2023-10-27 10:45:22 +07:00
Amilcar Ubiera 5c28fc6368
Fix to ssl_sock_imp_common warning 'io_read': 'void' function returning a value MSVC(C4098) (#3727) 2023-10-09 13:27:39 +08:00
Nanang Izzuddin b8fbdb2502
Fix build errors & warnings on MSVC2005 (#3722) 2023-10-02 09:00:56 +07:00
sauwming 05d03ad9ee
Fixed Coverity and build warnings (#3707) 2023-09-21 17:43:10 +08:00
sauwming 7ff31e3113
Set default SSL sockopt param to have TCP_NODELAY for GnuTLS backend (#3708) 2023-09-20 18:04:13 +08:00
Nanang Izzuddin d21ff6106d
Add MSG_NOSIGNAL flag to sendto() (#3695) 2023-09-18 12:37:37 +07:00
Riza Sulistyo d51e247135
Add option to disable renegotiation on TLSv1.2 or earlier (#3663)
* Add option to enable SSL_OP_NO_RENEGOTIATION on OpenSSL

* Add the option to runtime configuration

* Modification based on comments

* Add the implementation files and pjsua2 modification
2023-08-23 09:52:04 +07:00
Nanang Izzuddin fd8880397f
Add native SSL socket instance in TLS verification callback (#3630) 2023-08-22 13:49:07 +07:00
Riza Sulistyo af82c9085a
Prevent crash when reading cert file on Apple's Network framework SSL backend (#3664) 2023-08-22 11:23:30 +07:00
sauwming 828d8d1907
Avoid race condition in SSL's on_handshake_complete() (#3448) 2023-08-08 09:19:30 +08:00
Nanang Izzuddin 63b2f9ba41
Possible infinite loop in iOS replace socket (#3650) 2023-08-03 10:26:19 +07:00
Matthew Fredrickson 1a324c632b
If we don't clear the thread local error queue prior to calling SSL functions, sometimes other connections leave stale errors which will be returned and falsely attributed to the current SSL connection when calling SSL_get_error() (#3633) 2023-07-17 14:44:57 +08:00
Nanang Izzuddin 617428685d
Update the QoS DSCP map to follow RFC4594 guidelines (#3610) 2023-07-05 10:44:07 +07:00
Riza Sulistyo 914ce755a6
Support OpenSSL3 with "no-deprecated" build option (#3603) 2023-07-05 11:39:01 +08:00
Riza Sulistyo 8e69c977c7
Don't call SSL_shutdown() when receiving SSL_ERROR_SYSCALL or SSL_ERROR_SSL (#3577) 2023-07-05 11:38:21 +08:00
Matthew Fredrickson de317c6383
Locking fix so that SSL_shutdown and SSL_write are not called at same time (#3583) 2023-05-30 17:33:05 +08:00
sauwming 0665c17f02
Fixed coverity warning and various warnings (#3578) 2023-05-25 17:47:25 +08:00
Nanang Izzuddin 1af96abb89
Update SDP o= and t= lines to use 64 bit unsigned integer (#3565) 2023-05-17 11:53:31 +08:00
jimying 537958d0a7
activesock: check remaining buffer size to avoid buffer overflow (#3560) 2023-05-16 13:04:50 +08:00
jimying b4921bfcd9
Add close-on-exec flag (#3553) 2023-05-16 11:59:37 +08:00
Nanang Izzuddin ee37fc467b
Add local addr info in SSL handshake failure log (#3558) 2023-05-15 09:21:05 +08:00
sauwming e7c74cca42
Add sleep in ioq kqueue and fixed failed ioq stress test (#3499) 2023-04-13 11:15:27 +08:00
sauwming f5fab2619e
Fixed build failure if PJ_JNI_HAS_JNI_ONLOAD is disabled (#3496) 2023-04-13 11:14:48 +08:00
Riza Sulistyo 90a704b0c6
Change socket assertion check to allow socket handle value 0 (#3500)
* Change socket assertion check to allow socket handle value 0

* Modification based on comments

- Revert changes in sock_qos_symbian.cpp
- Remove check for sock value 0
2023-04-11 09:14:04 +07:00
jimying a4c9dc0c9b
Fix scan-build reports (#3471) 2023-04-06 10:26:10 +08:00
sauwming bdc66d4d41 Revert previous fix in timer test 2023-03-29 14:43:45 +08:00
bennylp d63c18136a Fix gcc sign-compare warnings 2023-03-29 13:30:36 +07:00
bennylp 2a69b0a5a8 Fix compilation warnings with stricter gcc options: -Werror -Wextra -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-shift-negative-value 2023-03-29 11:57:21 +07:00
bennylp 52fe443ea1 Minor changes based on reviews 2023-03-29 11:28:27 +07:00
bennylp 7a058dee81 Replace unsafe string functions such as sprintf, strcpy with the safer counterparts e.g. snprintf, strxcpy 2023-03-27 18:48:25 +07:00
sauwming 6f93c61854 Fixed uncompleted patch for SSL and pjsua_pres 2023-03-24 12:40:40 +08:00
bennylp 6f8b87c562 Merge branch 'coverity01' of https://github.com/pjsip/pjproject into coverity01 2023-03-24 11:11:27 +07:00
bennylp 5ed9461bbe Replace unsafe string functions such as strcpy, strncpy, strcat, and sprintf with newly implemented pj_ansi_strxcpy, pj_ansi_strxcpy2, and pj_ansi_strxcat 2023-03-24 11:11:20 +07:00
sauwming 978463060d Fixed incorrect SSL patch 2023-03-23 13:53:57 +08:00
sauwming 02356e87f7 Fixed warnings in pjlib, pjmedia, and pjnath 2023-03-23 12:10:45 +08:00
bennylp 6340cd143f Fixed printf style format warnings 2023-03-23 08:30:44 +07:00
bennylp 398fabd77f Fixed printf style format warnings 2023-03-22 08:45:23 +07:00
sauwming 29d872af40 Merge branch 'master' into coverity01 2023-03-20 18:29:57 +08:00