summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-07-08Wait for assisted candidate detection before emitting candidatesTobias Markmann
Due to missing signal connection and a copy'n'paste bug, Swift did not wait for port forwarding/public IP detection before emitting the list of local candidates. This is fixed now. The signal is automatically disconnected when the file transfer is finished and s5bServerPortForwardingUser_ is freed. Test-Information: Send a file between two Swift instances and verified log output. Change-Id: I6530a7ac1cbf6941061bd99aa3f3b0624ebc984c
2015-07-07Use environment variables for addresses used in NetworkTestTobias Markmann
Introducing SWIFT_NETWORK_TEST_IPV4 and SWIFT_NETWORK_TEST_IPV6 for the host addresses used in BoostConnectionTest.cpp. Passing these variables and ASAN/LSAN_OPTIONS for memory leak detection when calling the test from SCons. Test-Information: Tested on Elementary OS with correct available hosts and unavailable hosts. In both cases the behavior is the same as before. Change-Id: I24128c766642c5a2ee273f7c11624525ae33e270
2015-07-07Fix memory leaks reported by ASANTobias Markmann
Test-Information: Tested on Elementary OS with a LLVM/Clang 3.7.0 build. With this patch the reports for the fixed locations are gone. Change-Id: I0260fc85ad662335a69ace331f51ebe2f864ef97
2015-07-07Add hidden option to prevent disconnect when smartcard removedMili Verma
This patch adds an option 'disconnectOnCardRemoval' to system-settings.xml which when set to false allows the user's session to stay connected if the smartcard is removed. The default value of this option is true if it is not specified. Test-information: Tested on Windows using NIST smartcards. Tested true and false values set for this option in the file and also when option is not specified (true). Unit tests pass. Change-Id: I7e421b4153ff7d3000f41999add20d339076c96e
2015-07-06Add GSSAPI client authenticatorMili Verma
Test-information: Tested on Windows using WIP code. Unit tests pass. Change-Id: I766294e57dc6374830b865f3e57b07b67e7d2fe2
2015-07-02Reestablish connection with smart cardMili Verma
When the card is reset in shared mode (which is the mode we use), an application trying to access certain commands will be returned the value SCARD_W_RESET_CARD. When this occurs SCardReconnect() must be called. This wasn't done before so this patch fixes it. Also provides more logging for SCard function returns. Test-information: Tested on Windows using NIST smart cards. Before the fix, the Card Removed Error was seen often even after the initial connection was established. After the fix, the reconnect attempt is done so the error is not seen. Also verified that if a card is removed deliberately, then the user is logged out. Change-Id: I94748ab9ff944a79de655646e1e06a8b61776f4b
2015-06-30Add wrappers for Windows API to be used in GSSAPIMili Verma
Test-information: Tested on Windows using WIP GSSAPI code. Unit tests pass. Change-Id: I21f8f637480a21a014ec172431dd8d4a01a11620
2015-06-30Remove when sending an empty responseMili Verma
In RFC 6120, there are only 2 places where "=" is allowed - in the initial client auth and in the final server success response. While testing challenge response exchanges in Kerberos, it was seen that Swift was adding an '=' in other empty responses. This patch fixes it by sending an empty response instead of an '='. Test-information: Tested on Windows using a WIP GSSAPI authentication exchange with M-Link. Change-Id: I1f82bddbd1380361cbe43e45a2804156249582ae
2015-06-29Add WindowsServicePrincipalName classMili Verma
Test-information: Tested on Windows using WIP GSSAPI code. Unit tests pass. Change-Id: If872863d6a8b5a164f8ebec4f88e9939b4e73c62
2015-06-29Pass an optional error codeMili Verma
This patch creates and passes on an optional boost::system::error_code variable which contains more error info which can be displayed in case of an error. Test-information: Tested using WIP code on Windows. Change-Id: I285b8aec5e9c00d3a8e0d8cc0d5e7b4c5d94c099
2015-06-29Parse hostname for xep-0233Mili Verma
Test-information: Verified with M-Link. Unit tests pass. Change-Id: Ic675c8d7cd70e01be61c51c0280e1d7208b364ba
2015-06-18Only delete HistoryStorage if building with experimental featuresTobias Markmann
Clang raises a warning in non-experimental builds because the full type of HistoryStorage is not known and it tries to delete an instance (even though a null ptr) in the dtor. Test-Information: Tested on OS X 10.9.5 with Clang (Apple LLVM version 6.0). Change-Id: I8a06890967427af21e11e077e9ac59b67bdb810c
2015-06-14Fix Swiften DLL building on WindowsTobias Markmann
Template classes cannot have SWIFTEN_API annotations as with annotation code for instantiations of the template are expected to be in the DLL which cannot be guaranteed for any user type. With the complete implementation in available in the header it is not needed because 3rdParty Swiften users can instantiate an implementation as needed. This also conditionally includes SQLiteHistoryStorage.h conditionally in MemoryStorages.cpp, as otherwise the linker will expect an implementation of SQLiteHistoryStorage in the DLL. However, it is only built into the DLL if experimental features are turned on. Test-Information: Tested with experimental=on/off and swiften_dll=on/off. Change-Id: Ieec85675c167ec34cffd4745ac854a5949fb2037
2015-06-11Update progress bar on incoming file transfersTobias Markmann
Test-Information: Send a file from one Swift to another. Previously the progress bar did not update in the receiving client. Now it does. Change-Id: Ie710a4c1cfc389d6fcfb93de96250a80787883d3
2015-06-10Add ability to limit SChannel to TLS 1.0Kevin Smith
Some servers have very restrictive TLS stacks that respond badly to a bug in the SChannel TLS implementation, meaning that TLS has to be limited to 1.0. Add ClientOptions.tlsOptions. This is a method of passing options into the TLS stack. It's currently only used for the TLS 1.0 workaround in SChannel, but we might reasonably expose other options in the future, such as limiting cypher suites. Disables use of SSLv3 for SChannel Also updates the coding style in SchannelContext a bit. Test-Information: Compiles on both OS X and Windows(SChannel). OS X doesn't show the new option. Windows shows it, and remembers it between logins. Not tested against a server requiring 1.0 only, but a previous hack with the same approach was tested. Change-Id: I1e7854d43811fd173f21f98d4dc3915fc7a4b322
2015-06-08Add missing SWIFTEN_API annotations to public Swiften APITobias Markmann
Test-Information: Tested build on Windows 8 with VS 2014 and ran unit tests. Change-Id: I3d8096df4801be6901f22564e36eecba0e7310c4
2015-05-26Fix crash when sending a file to yourselfTobias Markmann
Use scoped_connection to prevent missing disconnection from signals. Stop and free S5BServer when stopping SOCKS5BytestreamServerManager. Test-Information: Tried sending a file to myself multiple times and it did not crash. Change-Id: If32075d8e9c243cab254776b924248227520e030
2015-05-19Consolidate Python and SCons files to tab based indentationTobias Markmann
Test-Information: Verified that SCons still runs on OS X. Change-Id: I7e9b97f90ee5581a691a959b6f2c999d93e0be53
2015-05-01Fix typoTobias Markmann
Change-Id: Ieeb9636b40bfd43b9b79dede71eefc288e6014d2
2015-05-01Add an EventOwner to NATTraversalRequests so that accociated objects are not ↵Tobias Markmann
released early This patch also disconnects possible slots on stop() from the signals. Test-Infromation: This fixes a crash that occured during testing with ConcurrentFileTransferTest. Change-Id: I2b443f40ac3359c8142fcffc084647312b9a1e76
2015-05-01Fix hash verification in Jingle FT to only verify one hash algorithmTobias Markmann
This also adds missing resets pointers to NULL after they are deleted. Test-Information: FileTransferTest crashed in some scenarios before; now it always runs successful. Change-Id: Ic63fd51eeb46e708221a04dc912e8bf2f1d4f9fb
2015-05-01Only close unneedded S5B connections on the S5B server if a S5B server is ↵Tobias Markmann
running Add a check on whether we have a running SOCKS5 bytestream server before trying to access it to close unneeded S5B connections to it after we decided on a candidate to use. Test-Information: Without this FileTransferTest crashes in the configuration that does not allow direct or assisted S5B connections. This patch fixes this issue. Change-Id: Ifcf59f82755b9620e7f5fa5841e45815a41ac442
2015-05-01Add resource management for S5B server and port forwardingsTobias Markmann
This patchs adds management of the SOCKS5 bytestream server and port forwarding setup to Swiften. The first file-transfer, regardless of incoming or outgoing transfer, will start and initialize the S5B server and if configured try to set up port forwarding. The last file-transfer to finish will will close the server and remove the port forwarding. Test-Information: Tested with upcoming ConcurrentFileTransferTest.cpp and running multiple S5B file-transfers in parallel. Change-Id: Idd09d3d0ef9498fc9435b0aee81f2b1061783342
2015-04-10Introduce FeatureOracle class for contact feature support detectionTobias Markmann
This modifies the feature detection in the ChatController to try to use the common features of all available resources feature detection if no full JID has been bound to the chat yet. Test-Information: Tested with two Swift instances. Tested a) the initial chat start case and, b) the offline/online. In case a) Swift used to initally show a yellow warning about no support for message receipts. This warning is gone now. In case b), after a user gone offline and online again in a running chat, Swift used to show a warning about missing support for message receipts. This warning is gone now. Change-Id: I7a769fde8d14847b180503aeaa58280c572d81b3
2015-04-08Add optional logging to native log framework on AndroidTobias Markmann
To enable native Android logging you need to pass "-DSWIFT_ANDROID_LOGGING" to the "cxxflags" and "-llog" to the "linkflags". Test-Information: Tested on OS X 10.9.5, with NDK API level 14 on an emulated Android 4.0 ARM instance. Tested that if enabled, Swift log messages appear in the Android system log via "adb logcat" instead of appearing on stdout. Change-Id: If89c870f0b664a5e65ccc1fa8a244826d2875ec1
2015-04-08Skip name lookup if manual hostname is a valid IP addressTobias Markmann
Removed dead debugging code and unnecessary includes as well. Test-Information: Tested with Swiften/QA/ClientTest, adjusted to have a manual hostname set in the ClientOptions. Tested on OS X 10.9.5, with NDK API level 14 on an emulated Android 4.0 ARM instance. Without this patch the connector timed out during name lookup trying to resolve the IP set in the ClientOptions::manualHostname. With this patch it skips lookup and connects successfully. Tested and verified unchanged behavior with this patch and without the manual address override set. Change-Id: I737327b2e66c9da78a1963e754bcf201b7d40626
2015-04-08Fix warning about unused private member variableKevin Smith
Test-Information: Compiles without the warning, unit tests pass. Change-Id: I31bce47e4d6595b4ef405a87b56cf71db004e6a0
2015-03-28Fix a bug in successful file-transfer termination in IncomingJingleFTTobias Markmann
IncomingJingleFileTransfer::terminate already sets the finshed state for the file-transfer. Test-Information: Verified in the logs that onFinished signal is only called once. Change-Id: Ib2084e1487ded2a921f61b237cd036e1ae4cf992
2015-03-28Set file-transfer finished state after checking the dataTobias Markmann
Test-Information: The FileTransfer::onFinished was not called when the file transfer finished. Verified with log output that it is called correctly now. Change-Id: I05f2a749ca3f0aece08cae9503a212cf0327f98a
2015-03-28Change IQ handling to allow non-final IQ handlers/respondersTobias Markmann
Previously all IQ handlers were final. The IQ handles were processed in last-added-first order and if the IQ payload matched the handler payload, the IQ would only be passed to that handler. This conflicts with our IBBReceiveSession. When running multiple concurrent file-transfers using multiple IBBReceiveSessions there are multiple IQ handlers for IBB content; one for every transfer. This commit allows a Responder to be set as non-final. In this case unhandled IQs will not be responded with an error but returned to the IQRouter so it can pass it to the next possible IQ handler. Test-Information: Tested with ConcurrentFileTransferTest with runs multiple IBB transfers in parallel. Change-Id: I8237e234cbe5c110deaa8c3d6ba303b65fd53d00
2015-03-28Add missing line endingsTobias Markmann
Test-Information: Builds. Change-Id: Ica4b1bca4ff71f103ee5ebad707bc0f95595ad37
2015-03-27Fix OutgoingJingleFileTransferTest and enable it againTobias Markmann
Test-Information: Unit tests pass. Change-Id: I793fb65fd2e760daddab0142abc33d4aa5b4fce5
2015-03-19Fix for HTTPConnectProxiedConnection to support responses in piecesTobias Markmann
This fix lets HTTPConnectProxiedConnection buffer response data in pieces until the end of the HTTP header is reached. Only then it will try to parse the HTTP header. This is *not* the HTTP chunked transfer encoding. Test-Information: Adjusted one test to respond in pieces and added a new test case that verifies that response data is buffered. Change-Id: Icfb987bdf2fc5771401a8a9c6979fa9ad1eebdca
2015-03-18Add test for ChatStateSerializerTarun Gupta
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Test for ChatStateSerializer passes. Change-Id: I871490a647ee54631cad025fc71f900cc0fa9770
2015-03-16Add ability to modify HTTP CONNECT proxy initializationTobias Markmann
This patch adds HTTPTrafficFilter and integrates it into HTTPConnectProxiedConnection. This allows the HTTP CONNECT proxy initialization process to be customized. Test-Information: Added a unit test that verifies the new functionality. Change-Id: I0b93c319fb205487b8be65717276cd0dd38851a3
2015-03-13Fix duplicate addition of CarbonsPrivateSerializer to ↵Tobias Markmann
FullPayloadSerializerCollection Test-Information: Builds and unit tests run through. Change-Id: I0dac62cdef56ec4780388f25d24ca0818b900dad
2015-03-13Add Carbons serializers to FullPayloadSerializerCollectionTobias Markmann
Test-Information: Unit tests still pass. Carbons serializers are tested directly without FullPayloadSerializerCollection. Change-Id: Ic0f961094daf09836326660859b41d86141e70b9
2015-03-02Move *TransportSession to their own filesTobias Markmann
Test-Information: Builds. Change-Id: I1d8a942a2063c6bc0f7322161a33c0413a6899a3
2015-02-20Add elements/parsers/serializers/tests for Message Carbons (XEP-0280)Tobias Markmann
In addition this patch adds an element, a parser and a serializer for the <thread/> element from XMPP IM. Test-Information: Implemented unit tests pass as expected. Change-Id: I0a14c778c2c0bf65f4b405c9878c741449bfe142
2015-02-17Disable SSLv3Kim Alvefur
Change-Id: I25328f60e211387f5d3fbcd6de155b7b8956c0f9 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2015-02-17Swiften XEP-0141 supportTim Robbings
Classes to support XEP-0141 data forms layout. This includes <page/>, <section/>, <reportedref/> and <text/> elements. The form parser and serializer classes have also been updated to handle these new elements, with added CPPUnit tests. Test-information: Tested using updated CPPUnit tests to check the parsing and serializing of new elements. All tests complete successfully. Change-Id: Ibeab22d2834512d06c7f656acd1ef24eea39d650
2015-02-16Run FileTransferTest correctly as part of the system integration testsTobias Markmann
If Scons is configured to run system unit tests, it will run FileTransferTest and test for working IBB transfer, direct S5B transfer and proxied S5B transfer. Test-Information: Tested ./scons test=all is working on Linux and OS X. Change-Id: Id70c9e1e9db9c897d9bfc7dd03b874afe5262207
2015-02-16Free ProxyFinder instance after we are done with itTobias Markmann
SOCKS5BytestreamProxiesManager will try to stop its ProxyFinder if it exists in its dtor. Test-Information: Running the FileTransferTest crashed before. Now it successfully runs through on Linux. Change-Id: I1e95694a5d32728123ddb436274901e4d8643974
2015-02-11Fix program output of Swiften/QA/ClientTestTobias Markmann
Test-Information: Tried to connect to BOSH service setting the boshPath to "http-bind" while "/http-bind" would have been correct. Change-Id: Ifc9bb574361c9eaa3baeffc2938d06a257275f2a
2015-02-11Fix DummyConnectionServer to use private accessors for its membersTobias Markmann
Test-Information: Builds. Change-Id: Ib5f1b4e9de814ab46723487e4d15974f0f5bd658
2015-02-11Add debugging helper and FileTransferTest.Tobias Markmann
FileTransferTests tests file-transfer interoperability with Swiften itself. It can test all combinations of FileTransferOptions or a specific combination when given. Test-Information: Inspected XML logs to ensure it does what it is supposed to do. Change-Id: I06215b60419dd23b367d01a2f038245a6c977720
2015-02-11Renable SOCKS5 bytestream proxy support for Jingle file transfers.Tobias Markmann
Test-Information: Tested interoperability with Swiften using FileTransferTest. Change-Id: Ic13a68a91cad199be0bfc8852ff43c25c7085f12
2015-02-11Wait for responder to terminate the the file transfer session after dataTobias Markmann
verification. Test-Information: Tested with FileTransferTest (coming with future commit) and inspected the logs. Change-Id: Idd2739e15ab944e8486065cb2a3bc559ce9053d1
2015-02-11Remove port forwardings on stop or destruction of SOCKS5BytestreamServerManager.Tobias Markmann
Test-Information: Verified with home router that supports UPnP that the forwards are removed on stop. Change-Id: Ie2a8fd56828cc01e456d40ff4e5500d3387c7afe
2015-02-11Restrict generated candidates and selected candidates to those allowedTobias Markmann
by supplied FileTransferOptions. Test-Information: Automatically tested all FileTransferOption combinations and verified it generates only allowed candidates. Change-Id: I0b3ce983a3f230a4c2c3940f5d928fd74d6012b6