1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 17:47:37 +00:00
Commit graph

27 commits

Author SHA1 Message Date
Mike Gelfand
f3968b7708 Load CA certs from system store on Windows / OpenSSL
Fixes: #446
2019-06-23 11:59:53 +03:00
LaserEyess
750589101a Parse session-id header case-insensitively (#765)
RFC 2616 defines headers as case-insensitive, so if rpc is behind a
reverse proxy that lowers the case of headers, transmission will not
parse them correctly.

A new wrapper function, `tr_strcasestr` is added to
libtransmission/utils.c to allow for comparisons of headers case
insensitively, and checks in cmake and autogen are included.
2019-03-17 17:37:52 +03:00
Mike Gelfand
ffcca3964d Adjust test names in CMake to be in line with autoconf ones 2017-12-02 17:58:15 +03:00
Mike Gelfand
30c7c05cbb Refactor completion scripts execution
There're still a few issues here and there, but overall I believe it's now
better than it was before.
2017-11-28 10:03:08 +03:00
Mike Gelfand
18aabdeb06 Introduce peer socket struct to improve readability 2017-06-28 18:50:05 +03:00
Mike Gelfand
f701d501a8 Move generic macros to a separate tr-macros.h file 2017-06-18 17:11:20 +03:00
Mike Gelfand
98695fe3c1 Introduce our own assertion macros with finer control 2017-06-08 10:24:12 +03:00
Mike Gelfand
1e3d20422a Reduce for loop variables scope 2017-05-14 01:38:31 +03:00
Mike Gelfand
448d8f39f6 CMake support for Solaris 2016-12-24 20:16:54 +03:00
Mike Gelfand
71af7be04f Improve support for wolfssl (formely cyassl) 2016-10-26 22:27:20 +03:00
Mike Gelfand
7f94c8df6c Add support for mbedtls (formely polarssl) 2016-10-26 22:27:20 +03:00
Mike Gelfand
26b0a041cc Factor out session ID into a standalone entity 2016-09-21 22:29:56 +03:00
Mike Gelfand
990dea4dd3 Only depend on iconv if found 2016-02-07 12:00:15 +00:00
Mike Gelfand
39749f8e4b Make it possible to force generic watchdir implementation in runtime 2016-01-25 21:48:58 +00:00
Mike Gelfand
53c38c760d Add tests in such a way that target name is expanded (CMake) 2016-01-04 19:50:32 +00:00
Mike Gelfand
ea48360212 #5663: Rework directory watching in daemon
Implement BSD/Darwin (kqueue) and Windows (ReadDirectoryChanges) mechanisms
for receiving directory change notifications. Use events instead of polling
for changes. Retry file parsing up to 3 times before giving up.

Huge thanks to missionsix for preparing first two versions of the patch.
2016-01-02 14:28:59 +00:00
Mike Gelfand
eee92c82ac Always add all source files to targets
Mark files which shouldn't be compiled as header-only, but still add
them as sources so that they are visible in e.g. MSVS project tree.
2015-12-29 02:04:37 +00:00
Mike Gelfand
829cbffaf7 Add version info to executables (on Windows). Group projects into folders (CMake). 2015-04-14 22:46:40 +00:00
Mike Gelfand
c7d2a7f959 #4400: Add CyaSSL support 2015-01-07 02:04:08 +00:00
Mike Gelfand
1d58af5082 Increase BASE64 encoding size when using system libb64
Remove BASE64 reference testing as it's only libb64 now.
Improve the test to ignore \r and \n when comparing BASE-encoded
strings to not fail on system (unpatched) libb64.
2015-01-03 21:35:20 +00:00
Mike Gelfand
b928ae1ba8 Use libb64 instead of OpenSSL to encode/decode BASE64
Some crypto libraries (like CyaSSL, MatrixSSL and CommonCrypto) either
don't have or expose this functionality at all, expose only part of it,
or (like OpenSSL) have heavyweight API for it. Also, for the task as
easy as BASE64 encoding and decoding it's much better to use small and
simple specialized library.
2015-01-01 21:16:36 +00:00
Mike Gelfand
45f8bb8c40 #4400, #5462: Add possibility to test one crypto backend against another (reference) backend 2015-01-01 14:23:47 +00:00
Mike Gelfand
eee49af2b4 Improve cross-compilation support when using CMake 2014-12-20 22:28:43 +00:00
Mike Gelfand
a3fdd5f029 #5369: Improve file allocation error checking (initial patch by g.proskurin)
Additionally,
* always close file descriptor on error in cached_file_open (FD leak),
* only store file descriptor to tr_cached_file on success,
* call ftruncate after xfsctl-based preallocation so that correct size
  is reported by the system.
2014-12-10 18:23:11 +00:00
Mike Gelfand
117ab3e8d2 #4400, #5462: Move DH helpers to crypto-utils
On a way to factoring out OpenSSL support to a standalone file to ease
addition of other crypto libraries support in the future, move helpers
providing DH key exchange to crypto-utils.{c,h}. OpenSSL-related
functionality (DH context management) is moved to crypto-utils-openssl.c.
Since we know in advance that DH secret key management code will be the
same for most of backends, implement common functionality in separate
crypto-utils-fallback.c.

Add new tr_dh_ctx_t and tr_dh_secret_t types and functions to be
implemented by crypto backends:
* tr_dh_new - allocate DH context,
* tr_dh_free - free the context,
* tr_dh_make_key - generate private/public keypair,
* tr_dh_agree - perform DH key exchange and generate secret key,
* tr_dh_secret_derive - calculate secret key hash,
* tr_dh_secret_free - free the secret key,
* tr_dh_align_key - align some DH key in the buffer allocated for it.

Make DH secret key not accessible in plain form outside the crypto
backend. This allows for implementations where the key is managed by
the underlying library and is not even exposed to our backend.
2014-12-04 19:18:08 +00:00
Mike Gelfand
4cfe7e7ddb #4400, #5462: Move SHA1 helpers to crypto-utils
On a way to factoring out OpenSSL support to a standalone file to ease
addition of other crypto libraries support in the future, move helpers
providing SHA1 calculation to crypto-utils.{c,h}. OpenSSL-related
functionality (SHA1 context management) is moved to crypto-utils-openssl.c.

Add new tr_sha1_ctx_t type and functions to be implemented by crypto
backends:
* tr_sha1_init - allocate SHA1 context and and initialize it,
* tr_sha1_update - hash some [more] data,
* tr_sha1_final - finish hash calculation and free the context.

Add new files to CMakeLists.txt (leftover from previous commit) to fix
CMake-based configuration.
2014-12-04 12:13:59 +00:00
Mike Gelfand
83c4edb008 #5828: Initial CMake build system support 2014-12-01 19:55:22 +00:00