summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-09-29Explicitly handle all possible SecTrustResultType enum valuesTobias Markmann
Test-Information: Unit tests pass on macOS 10.12. Change-Id: I32f884e2525b6200e5fb3f04d58f77304d16daa0
2016-09-29Fix potential resource leaksTobias Markmann
IDGenerator was missing the virtual keyword on its method which is reimplemented by SimpleIDGenerator. Some other classes were missing destructors or virtual destructors. Test-Information: Builds on macOS 10.12 with Qt 5.5.1, all unit tests pass. Change-Id: I482bc249578d38a922256d1fa5241515ce45d0c0
2016-09-26Use const std::unique_ptr for pimpl idiom usageTobias Markmann
All our pimpl idiom usage used std::shared_ptr due to being written in C++03. Now we use C++11 and const std::unique_ptr is more sensible. Test-Information: Builds on macOS 10.12 and unit tests pass. Change-Id: I1b9b3fbb22e337d53ae71e5a5e03118998cc3376
2016-08-24Use SSL_CTX_set_default_verify_paths to set trusted CAs for OpenSSLTobias Markmann
This fixes setup of trusted CAs on Fedora. Test-Information: Tested successful login to two different hosts with different CAs. Previously the there was no certificate warning on Debian 8 and a certificate warning on Fedora 24. With this patch there is no certificate warning anymore on Debian 8 and Fedora 24. Change-Id: I70e71eb9734f2012bcd5c4b784bab47917b44234
2016-08-10Add missing includeKevin Smith
Test-Information: After this patch, experimental=1 builds on OS X (didn't previously) Change-Id: Ibaba190212f22332d776f3ecc00f692621da0815
2016-08-05Add a debugging helper for serializing Swiften types to ostreamTobias Markmann
Test-Information: Tested on OS X 10.11.6. Change-Id: I9ecb60f5c3956d52fd42acd1b0d85725277efc51
2016-07-27Fix Doxygen warningsTobias Markmann
This fixes Doxygen warnings about missing parameter documentation or documentation of non-existing parameters. Test-Information: Ran ./scons doc=1 without warnings with Doxygen 1.8.11. Change-Id: I360d042e5c80f418e7574a26fa1283a82fc504d4
2016-07-27Include missing cassertMichael Vetter
Test-Information: Build successfully on openSUSE Leap 41.2 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Change-Id: I9bd96e99e166ae02e1c2f1a8481d61c57edbbe71
2016-07-22Remove pragmas to ignore unused private fieldsTobias Markmann
They were introduced a while back through automatically generated code. Removal of those #pragma statements reduces the code and further improves maintainability. Test-Information: Builds on OS X 10.11.5 without any warnings. Change-Id: Idc2989663d39e351bedf9e1355eb5c7d163f11c2
2016-07-22Add support for libminiupnpc version 2Tobias Markmann
Test-Information: Build successfully on openSUSE Tumbleweed which only has libminiupnpc 2.0 as package. Unit tests passed. Change-Id: I650e1224014162b55cdf64df7e72466b52dc3ade
2016-07-20Add release dates to Swift and Swiften ChangeLog.mdTobias Markmann
The added dates are the author dates of the tagged commit corresponding to the release. Test-Information: None. Change-Id: I35c72a8fb017c48a99c5b655d7857498cba790b3
2016-07-15Add missing includes for assert()swift-4.0beta1Tobias Markmann
This fixes building via ./Swift/Packaging/Debian/package_all_platforms.sh . Removed #pragma statements and did minimal associated cleanup. Test-Information: ./Swift/Packaging/Debian/package_all_platforms.sh passes successfully. ./scons test=all passes on OS X 10.11.5. Change-Id: I1688da31ca6081eddfcda83d473b15c3f711b420
2016-07-14Close Swift and Swiften changelogs for 4.0-beta1Tobias Markmann
Test-Information: None. Change-Id: I04e12ee197e45ec47a8f93bf97248adbbe12f649
2016-07-14Add in progress changelog for SwiftenTobias Markmann
Test-Information: None. Change-Id: Iab2023d176c4b49f5cccc82968ea45b80e0b7e78
2016-07-11Fix handling of incorrect MUC component behaviorTobias Markmann
Swift used to crash when a MUC component returned multiple unavailable presences on rejoin of a room hosted on a restarting buggy MUC component. Test-Information: Added test case that used to crash Swift. Tests pass without crash on OS X 10.11.4 Change-Id: I52280976944170c6e143197d4b3dc517dc13ecbb
2016-07-01Implement Message Carbons in Swift and Swift/ControllersTobias Markmann
If the server supports message carbons, Swift will try to enable it. Carbon copied messages will open a chat window in the background if no chat window exists for the conversation. Test-Information: Tested with a XMPP server Swift and a mobile Android client all supporting message carbons. Tested direct messages and MUC PM messages. All working as expected. Added unit tests for message carbons of sent messages and message carbons of received messages. All unit tests pass on OS X 10.11.5 Change-Id: I8d5b5d9975651a2353909dea976f58e4bf12e014
2016-06-29Fail file-transfer if proxy session of candidate does not existTobias Markmann
Test-Information: Tested with a buggy XMPP client that calculates S5B DSTADDR in a non-standard way. Previously this lead to Swift crashing on an assert. Now Swift just indicates file-transfer failure to the other party. Change-Id: I4ed47f9647a1851f2a5101657bcd569c106d638f
2016-06-22Treat JIDs with empty resources as invalidTobias Markmann
Cleaned up JID.cpp in process. Test-Information: Adjusted tests accordingly. All tests pass pass on OS X 10.11.5. Change-Id: I774344c8f7378dafe9249217503c082f46890457
2016-06-22Temporarily disable CertificateErrorTestTobias Markmann
The tests are based on the http://www.tls-o-matic.com/ service, which is currently dysfunctional. Disabling the test so running all system tests does not fail anymore. Test-Information: ./scons test=all passes on OS X 10.11.5. Change-Id: I8df2e15efa6787e01dfebd78b61e07d1d1eed5c0
2016-06-14Fix handling of notify attribute in PubSub retract elementsTobias Markmann
Test-Information: Added serializer and parser unit tests. All tests pass on Mac OS X 10.11.4. Change-Id: I8550c76ba182a67613d55634c72c0f2979f8b80a
2016-06-14Add support for URLs with IPv6 addresses in Swift::URLTobias Markmann
Test-Information: Added unit tests and test cases from RFC 2732. All tests pass on OS X 10.11.5. Change-Id: Ic76e57985109912871c05d12253f73d3653bd7a3
2016-06-10Fix remaining compiler warnings on OS X with clangTobias Markmann
This changes HippoMocks include to -isystem include so it will not cause compiler warnings. This changes UserLocation floating point values to double and remove remaining numerical casts. Change C++11 compiler test to not cause warnings. Test-Information: Builds with allow_warnings=0 on OS X 10.11.5 with Xcode clang. Change-Id: I26c60265a86c9be656089ade63fe9ad63851580f
2016-06-02Add missing define for static building for swiften-configTobias Markmann
This fixes building swiften-config on Windows. Test-Information: Successfully build swiften-config on Windows 8 with VS 2013. Change-Id: I9dfb042485dc8ab06003d789e2c106efd308d725
2016-05-27Add presence to manually added contacts in 'Start Chat…' dialogTobias Markmann
This fixes a bug where manually added contacts, i.e. the user entered the address and hit the 'Add to list' button, were missing the correct presence in the contacts list in the 'Start Chat…" dialog. Test-Information: Tested on OS X 10.11.5 with Qt 5.4.2. Tested adding a roster member via the drop down suggestion and via manually entering the JID and clicking the 'Add to list' button. In both cases the correct presence was shown. Added a test verifying that empty JIDS are invalid. Change-Id: Idb18e4ad2b5c0afb48461796f64e8f11f02a24fd
2016-05-25Remove unnecessary include of iostream headerTobias Markmann
Move std::cout/cerr logging to SWIFT_LOG. Test-Information: Builds and all tests pass on OS X 10.11.5. Change-Id: I0a0c24654a8b3abf3244a79fd6d970eee90559d0
2016-05-04Fix /me message handling for highlighted messagesTobias Markmann
Test-Information: Added a unit test to test for the fix. Tests pass on OS X 10.11.4. Change-Id: Ibf071ae47663bfefdc856339932de6a1fe4a642d
2016-04-28Change remaining std::auto_ptr usage to std::unique_ptrTobias Markmann
Test-Information: Builds and tests pass on Ubuntu 16.04. Change-Id: If8da50619b0e029437b3b9d6b146f2ed49b5bf60
2016-04-25Convert hard tabs to four spaces in all our SConscript/*.py filesTobias Markmann
Test-Information: Test that it still builds and unit test pass on OS X 10.11.4. Change-Id: I2eb4a0b707991aee553db36a8cd1ae28b813acab
2016-04-12Use C++11 threading library instead of Boost.ThreadTobias Markmann
This cuts down our dependency on Boost further. Another benefit is that mutex classes of C++11 standard library are recognized by TSAN. Test-Information: Unit and integration tests pass on OS X 10.11.4. Change-Id: Id4dcdb42e3d5155e107ce1d7618acbf26f913b6f
2016-04-11Drop executable permission on source filesMichael Vetter
Drop executable rights on Swiften/Network/UnboundDomainNameResolver.* License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Change-Id: Ie6e6eab48b96dff64e82e76615c51863baf37816
2016-04-08Fix code in response to compiler warnings by clangTobias Markmann
Test-Information: Builds on OS X 10.11.4 with Apple clang and clang master. Change-Id: I012577e29c6fcf2fb452b4f13912aaeb37250fb5
2016-04-05Migrate to Boost.Signals2 from Boost.SignalsTobias Markmann
Boost.Signals was deprecated and is not improved further. This patch removes Boost.Signals from 3rdParty and adds Boost.Signals2 and its dependencies. Also removed the Qt signals compatibility file Swiften/Base/boost_bsignals.h. Test-Information: Build and ran unit tests on OS X 10.11.4. Confirmed successful login using Swift client. Change-Id: Ie6e3b2d15aac2462cda95401582f5287a479fb54
2016-04-04Modernize code to use range based for loops using clang-tidyTobias Markmann
Run 'clang-tidy -fix -checks=modernize-loop-convert' on all source code files on OS X. This does not modernize platform specific code on Linux and Windows Test-Information: Code builds and unit tests pass on OS X 10.11.4. Change-Id: I65b99e0978cfab8ca6de2a3e5342e7a81416c12c
2016-04-04Apply automated clang-tidy fixes and add missing includesTobias Markmann
Test-Information: Builds on OS X 10.11.4 and unit tests pass. Change-Id: I8775e8d1e3addbc88b220c1cc618637f706daca2
2016-04-04Modernize code to use C++11 shared_ptr instead of Boost'sTobias Markmann
This change was done by applying the following 'gsed' replacement calls to all source files: 's/\#include <boost\/shared_ptr\.hpp>/\#include <memory>/g' 's/\#include <boost\/enable_shared_from_this\.hpp>/\#include <memory>/g' 's/\#include <boost\/smart_ptr\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/weak_ptr\.hpp>/\#include <memory>/g' 's/boost::make_shared/std::make_shared/g' 's/boost::dynamic_pointer_cast/std::dynamic_pointer_cast/g' 's/boost::shared_ptr/std::shared_ptr/g' 's/boost::weak_ptr/std::weak_ptr/g' 's/boost::enable_shared_from_this/std::enable_shared_from_this/g' The remaining issues have been fixed manually. Test-Information: Code builds on OS X 10.11.4 and unit tests pass. Change-Id: Ia7ae34eab869fb9ad6387a1348426b71ae4acd5f
2016-04-01Modernize code to use C++11 nullptr using clang-tidyTobias Markmann
Run 'clang-tidy -fix -checks=modernize-use-nullptr' on all source code files on OS X. This does not modernize platform specific code on Linux and Windows Test-Information: Code builds and unit tests pass on OS X 10.11.4. Change-Id: Ic43ffeb1b76c1a933a55af03db3c54977f5f60dd
2016-03-31Convert tabs to 4 spaces for all source filesTobias Markmann
Removed trailing spaces and whitespace on empty lines in the process. Changed CheckTabs.py tool to disallow hard tabs in source files. Test-Information: Manually checked 30 random files that the conversion worked as expected. Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
2016-03-31Stop building some TLS providers as always staticKevin Smith
Thanks to Manfred Urban for reporting that dynamic libraries weren't working. Test-Information: Swiften Builds on OS X with swiften_dll=True Change-Id: I31e40ac118b9be6b43803a2bbcbfef3a9f9f9d21
2016-03-30Apply consistent #include grouping and sorting styleTobias Markmann
Changed "" style includes to <> style. Test-Information: Build with Clang 3.9.0 and ran all tests on OS X 10.11.4. Change-Id: Ic05e53f2e5dba39cc1307b116fc5f17b62ab9eb8
2016-03-17Tidy XEP-0141 codeTim Robbings
This change addresses some feedback the previous XEP-0141 commit (a39d650). Test-information: Ran the CPPUnit tests, these completed successfully. Change-Id: I2caf1eb1349f7527bd9af8ce8adfb194391253e4
2016-03-17Don't allow JIDs with explicitly empty resourcesKevin Smith
A JID may have no resource, but may not have an empty resource. Mark such JIDs as invalid. Test-Information: Added a unit test for the failure case (and made it pass). Other unit tests still pass Change-Id: I4fb300f716e635a3f8f02843891f25218da77130
2016-03-15Explicitly convert between nullable and non-nullable on OS XTobias Markmann
Clang was complaining about implicit conversions between nullable and non-nullable NSString pointers. Adjusted our std::string -> NSString* conversion utilities to check for nil and return an empty std::string in that case. Replaced uses of [NSString stringWithUTF8String] with our STD2NSSTRING macro. Turned std::string <-> NSString* conversion macros into functions. Test-Information: Builds without the warning on OS X 10.11.3 and Swift runs without issues. Change-Id: I949f2f3332018391aead58ef362764f4b7955b01
2016-03-09Improve profile editing UX when vCard is not supportedTobias Markmann
Previously, when editing your own vCard and the server responded with an error, the user would indefinitely see a spinner. With this commit, the user will see an error message instead. Test-Information: Tested on OS X 10.11.3, with a XMPP server with enabled and disabled vCards. The enabled case still works as expected and in the disabled case the error message is shown, instead of the indefinite spinner. Change-Id: Ic9167ee633a2f9a9fa3b520f6067dc2c94857c07
2016-03-08Remove superfluous implementation filesTobias Markmann
Test-Information: Builds on OS X 10.11.3. Change-Id: I3177f158c959944c89a028ac0c4cc79a45ed1ac3
2016-03-04Fix small issues around Swiften/QA/TLSTestTobias Markmann
The jabber_org.crt was falsely modified in commit 0297fa1; reverted the file to its previous version. Fixed a syntax error in CertificateErrorTest. Fixed compilation of TLS stack with external OpenSSL. Test-Information: Tested compilation ./scons test=system Swiften/QA/TLSTest with OpenSSL on OS X 10.11.3. Change-Id: I58caf94dded128d3ee725b1961e54ad2955d70aa
2016-02-29Add workaround for building with Boost 1.60 as C++11Tobias Markmann
Test-Information: Successfully built Swiften as C++11 with external Boost 1.60 on OS X 10.11.3. Change-Id: I2c5a7c22f5f8c14ee7befcaeb84b7d1f093932f6
2016-02-29Fix compilation with Boost 1.60Tobias Markmann
Building with Boost 1.60 showed a bug in WindowsGSSAPIClientAuthenticator.cpp, passing NULL to a method expecting a const boost::optional reference. Passing a default constructed boost::optional here instead now. Test-Information: Compiles with VS 2015 and Windows 10 and externally built Boost 1.60. Change-Id: I5c67d706dade21c60b006b13d441355714a42ec2
2016-02-29Fix possible race condition between Connection and ConnectorsTobias Markmann
The issue occurs with ProxiedConnection that started connecting but do not have an external reference anymore. As soon as the handlers of the ProxiedConnection are disconnected from the signals of the connection_ object, the remaining references to a shared ProxiedConnection vanish and the ProxiedConnection is deleted, while it still requires access to its members in ProxiedConnection::handleConnectFinished(). Test-Information: All tests pass on OS X 10.11.3. No TSAN reports on Debian 8 in a scenario with randomly connecting/disconnecting Client instances that use a HTTP proxy. Change-Id: I4d6d2c85013e066d9ed298aa9b913afc83949e35
2016-02-29Fix data race in BoostConnection reported by TSANswift-4.0alphaTobias Markmann
ThreadSanitizer reported a data-race between Boost's socket close() and async_read_some(). Test-Information: Verified all tests still pass and that TSAN does not report an error anymore in a scenario where a Client connects/dis- connects randomly. Tested on Debian 8 and OS X 10.11.3. Change-Id: I5e705efb15bee767dd5a55539854b5e488b3bf64
2016-02-15Support early IBB use in Jingle File TransferTobias Markmann
Previously Jingle File Transfer in Swiften only used IBB transport as fallback mechanism. With this patch Swiften will use IBB transport candidates directly in the first session-initate/session-accept message if the other party only supports IBB. Fixed a ASAN reported heap-use-after-free in SOCKS5BytestreamServerManager.cpp while testing. Test-Information: ./scons test=system passed without error. Testing all sender/receiver file-transfer option configurations with FileTransferTest resulting in expected behavior. Successfully transferring a file between two Swift instances. Change-Id: Ia0ffeaa1fd54fc0da23db75344c9e94f9d03a774