summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-07-09tests/certs: update crl for 5 years indeedgabble-0.18George Kiagiadakis1-11/+10
The previous attempt only updated it for 1 year, by mistake https://bugs.freedesktop.org/show_bug.cgi?id=79548
2016-07-04wocky-test-connector-server: report errors when asserting on finishing async ↵George Kiagiadakis1-4/+12
operations
2016-07-04wocky-connector-test: allow test server to dispatch any pending events ↵George Kiagiadakis1-0/+12
before teardown This is to fix an assertion failure that happens in the "/connector+ssl/econnreset/client-open" test. In this test, the server closes the connection and the client catches up immediately and closes too. When the client closes, it forcibly terminates the server, but in most cases the server's socket close operation doesn't have a chance to finish before server teardown is called, so the teardown function hits cancel on the GCancellable that is linked with the operation and finally the operation ends up repording an "Operation cancelled" error. By running the GMainLoop once before calling teardown, we ensure that the socket close operation has a chance to finish gracefully.
2016-07-04Bump required glib version to 2.44, as we now depend on GIO http proxyGeorge Kiagiadakis8-13/+3
Since g_type_init() is deprecated in more recent glib versions, also remove all calls of it to fix compilation. g_type_init() is not necessary to be called anymore, it is a no-op. https://bugs.freedesktop.org/show_bug.cgi?id=94031 Reviewed-by: Diane Trout <diane@ghic.org>
2016-07-04Remove wocky-http-proxy, upstreamed in GIO nowGeorge Kiagiadakis8-545/+28
The wocky http proxy has now moved in GIO, so we no longer need to maintain it here. I have kept the unit test for the moment, to verify that the code in gio works the same as the one that we used to ship in wocky. There was one difference in the code from GIO, though. It includes "Basic" as part of the authorization string. According to RFC this is correct, so it looks like the wocky proxy client code was doing this wrong. I have updated the test to reflect that. Additionally, this commit removes support for building GIO proxy support depending on whether GIO is recent enough or not. We can now safely depend unconditionally on a recent enough version. https://bugs.freedesktop.org/show_bug.cgi?id=94031 Reviewed-by: Diane Trout <diane@ghic.org>
2016-07-04Update CRL for 5 years (Closes: #79548)Diane Trout3-23/+26
* Add hints about what the test failure looks like * Update the example crl update command line. * Instead of having two copies of the CRL, replace one with a symlink. This way when one is updated, both are updated. https://bugs.freedesktop.org/show_bug.cgi?id=79548 Reviewed-by: George Kiagiadakis <gkiagia@tolabaki.gr>
2016-07-04Rename a test to avoid a duplicate test error messageDiane Trout1-1/+1
Reviewed-by: George Kiagiadakis <gkiagia@tolabaki.gr>
2016-07-03wocky-tls: replace deprecated gnutls type with its modern versionGeorge Kiagiadakis1-1/+1
It looks like gnutls has just renamed their struct types to have a _t at the end of their name
2016-07-03soup_session_async_new is deprecated (Closes: #96383)Diane Trout2-2/+2
* Replace with new call soup_session_new (); * Indicate minimum libsoup version https://bugs.freedesktop.org/show_bug.cgi?id=96383 Reviewed-by: George Kiagiadakis <gkiagia@tolabaki.gr>
2014-05-07wocky-jingle-info: don't try using self if it's NULLGuillaume Desmottes1-5/+4
This callback can deal with self being destroyed but it was trying to access self->priv before early returning.
2014-03-19data-form: reformat <code> blocks so recent gtk-doc can copeSimon McVittie1-4/+6
Recent (Markdown-based) gtk-doc doesn't like <code> spanning more than one line, causing a build failure. Reviewed-by: Guillaume Desmottes
2014-03-19jingle-content: reset idle ID in its callbackGuillaume Desmottes1-0/+2
The callback returns FALSE so the source will be invalidated. Recent GLib now raises a critical when attempting to remove an invalid ID, making some jingle tests failing. (cherry picked from commit 01fbaec365cc58d6f3de46ce3f54f6413f3ec0f9)
2013-09-06If we send an IQ to a server allow "from" to be emptyDavid Edmundson1-0/+10
2013-08-09Fix examples' and tests' dependenciesSimon McVittie2-34/+1
All Automake products automatically depend on their SOURCES and everything identifiable as a file in their LDADD, unless you set their DEPENDENCIES, which take precedence (and have "replace", not "add", semantics). As a result, setting DEPENDENCIES is actually harmful here: it makes the tests and examples not depend on their own source code! For the one test that has non-trivial extra dependencies, use EXTRA_x_DEPENDENCIES, which has the desired semantics. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67953 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Vivek Dasmohapatra <vivek@collabora.co.uk>
2013-08-09Tests: don't assume that other things can sneak in ahead of cancellationSimon McVittie5-5/+23
The porter test asserted that if you cancelled the sending of a stanza after it had already been (sent and) received, the send reported success, not cancellation; and the SASL auth test asserted that if you closed a connection at around the same time that a cancellable had been cancelled, the close reported success, not cancellation. However, recent GLib seems to be either more careful about deferring the results of async operations to an idle, or more consistent about reporting the cancellation as an error even if the operation's success had already been recorded. As a result, these operations reported cancellation. To avoid that, delay the cancellation a little. [Mike Ruprecht clarified on IRC that "more consistent about reporting the cancellation as an error" is one of the changes from GIO being ported to GTask in 2.36. -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67900 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Vivek Dasmohapatra <vivek@collabora.co.uk>
2013-08-09wocky-dummy-xmpp-server: don't turn off non-blocking on the socketSimon McVittie1-4/+0
The very next thing we did with it was to give it to GSocketConnection, which would turn on non-blocking again; so this code wasn't doing anything except harming our portability. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67900 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Vivek Dasmohapatra <vivek@collabora.co.uk>
2013-08-09wocky-xmpp-reader-test: don't assume non-characters will be replacedSimon McVittie1-7/+36
GLib now follows Unicode Corrigendum 9, which clarifies that libraries shouldn't prohibit non-characters. We were assuming it did. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67900 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Vivek Dasmohapatra <vivek@collabora.co.uk>
2013-08-09wocky-connector-test: stop putting sockets in blocking modeSimon McVittie1-13/+0
GSocket configures its underlying fd to be in non-blocking mode, and implements blocking calls by select()ing (or equivalent) first. If we break this assumption, most test cases in wocky-connector-test hang in a recv() that should have been non-blocking. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67900 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Vivek Dasmohapatra <vivek@collabora.co.uk>
2013-08-08docs: expect wocky-jingle-*.xml to be generated, not jingle-*.xmlSimon McVittie1-11/+11
I'm not sure whether this ever worked correctly, but the build currently fails on Debian unstable, and this fixes it. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67875 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-06-04WockyJingleSession: check more preconditions in public APISimon McVittie1-15/+73
Some were already checked, but as assertions: this is (now) public library API, so downgrade to g_return_if_fail(). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65131 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
2013-06-04WockyJingleFactory: ref session while calling parse()Simon McVittie1-3/+14
wocky_jingle_session_parse() advances the session's state machine. In particular, it may cause termination, which causes the session to be removed from the factory's hash table, which may cause its last ref to be released. Until recently, this would have gone unnoticed, but wocky_jingle_session_acknowledge_iq() now emits a signal from the session (to check whether it has the "is Google webmail" quirk), and that causes a check that it is in fact still a valid session object. Also correct a misleading comment spotted while debugging this: priv->sessions owns both key and sess. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65131 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
2013-05-30Acknowledge Jingle IQs in a way that the Google webmail client likesSimon McVittie3-8/+70
The Google webmail client currently starts calls like this: <iq type="set" ...> <jingle xmlns="urn:xmpp:jingle:1'" action="session-initiate" ...>...</jingle> <session xmlns="http://www.google.com/session" type="initiate" ...>...</session> </iq> (This isn't valid XMPP Core, because 'An IQ stanza of type "get" or "set" MUST contain exactly one child element', but we can tolerate it.) When called, it also echoes the contents of the sender's IQ back to the sender. It appears that this is how, when it makes an outgoing call, it determines which dialect the recipient wants to use: the recipient echoes the appropriate child element. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65131 Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
2013-05-30Require GLib 2.32Simon McVittie8-27/+6
This avoids compilation failing because the new(ish) g_thread_new wasn't available in our target version. telepathy-gabble indirectly depends on GLib 2.32 anyway, via telepathy-glib 0.20. Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
2013-05-30Merge branch 'gabble-0.16'Simon McVittie1-0/+3
2013-05-29CVE-2013-1431: respect tls-required flag on legacy Jabber serversgabble-0.16Simon McVittie1-0/+3
It's checked elsewhere for XMPP 1.0 servers, which can either use "old SSL" or perform STARTTLS. Legacy Jabber can only use "old SSL", which is similar to https - connect to a separate port, typically 5223, and start speaking SSL - so if the connection was ever going to be encrypted, by this point it already would be. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65036 Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2013-03-21Make examples/Makefile.am indentation consistentWill Thompson1-5/+5
2013-03-21dump-certificates: check (and fix) coding styleWill Thompson2-2/+4
2013-03-20Regression tests for malformed FORM_TYPE crashesWill Thompson1-0/+126
These pass because 565f2ed54.
2013-03-20Regression test for hashing anonymous fieldsWill Thompson1-0/+47
https://bugs.freedesktop.org/show_bug.cgi?id=61433
2013-03-18examples: link against gnutlsDominique Leuenberger1-0/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61792 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-03-01Fix enumtype generation in out-of-tree buildsWill Thompson1-12/+11
2013-03-01Merge branch 'gabble-0.16'Will Thompson2-8/+31
2013-02-27caps_hash: don't crash if FORM_TYPE has no <value>Will Thompson1-7/+22
Previously there were a couple of ways this could crash: * First, if you had a <field type='hidden' var='FORM_TYPE'> with no <value> child, field->default_value would be NULL so g_value_get_string (field->default_value) would critical and return NULL and then you'll be in undefined hell. * Having fixed that, the code to sort data forms by FORM_TYPE would also crash because it happens before the FORM_TYPEs have been validated and used g_value_get_string() without checking and then strcmp()ed the possibly-NULL result. I actually have a work-in-progress branch that makes this all a lot less hairy by adding, among other things, a wocky_data_form_get_form_type() function which can do the validation for us. But better to fix the crashes before refactoring them away. https://bugs.freedesktop.org/show_bug.cgi?id=61433
2013-02-25caps_hash_compute_from_lists: skip anonymous fieldsWill Thompson1-0/+8
https://bugs.freedesktop.org/show_bug.cgi?id=61433
2013-02-25wocky_data_form_field_cmp: cope with var being NULLWill Thompson1-1/+1
https://bugs.freedesktop.org/show_bug.cgi?id=61433
2013-02-22WockyConnector: reduce duplicated code to complete resultWill Thompson1-22/+20
Notice that some of the paths set priv->result to NULL before completing it, and some do not. I particularly like the one in establish_session_recv_cb which assigns priv->result to a tmp variable but forgets to set priv->result to NULL! I hoped this would make the connector re-usable between successful connection attempts, but it doesn't because priv->conn is not cleared out so it crashes when the stream is establed the second time you call wocky_connector_connect_async(). At least all the code paths crash consistently now, though! (Previously if you had connected to a pre-XMPP Jabber server, wocky_connector_connect_async() did not immediately reject a second call and would crash later in the same way this now does.)
2013-02-22connector-test: use properly-named variables.Will Thompson1-9/+9
This made the assertion that failed confusing: the message was about 'identity', but it was actually a test of the 'resource' property.
2013-02-22Fix wocky-connector-testWill Thompson1-2/+4
I changed the default value for WockyConnector:resource to NULL in 5fb069a, but didn't update the test accordingly.
2013-02-22receive-messages example: add a --resource parameterWill Thompson1-2/+5
2013-02-22Connector: don't try to generate a random resourceWill Thompson1-4/+4
Previously, there was no way to leave the resource entirely up to the server: while the binding code deals correctly with priv->resource being NULL, it was impossible to make it NULL. But the random resource generation was broken, too: the RNG was never seeded so the resource always came out the same.
2013-02-20muc: include GError and type in both error signalsWill Thompson1-14/+15
2013-02-20WockyXmppError: update to RFC 6120Will Thompson2-4/+26
The changes are: * payment-required is removed; * not-authorized is added to the schema (it was already defined in Wocky); * policy-violation is added. XEP-0086 doesn't define an error code mapping for it, so I chose 406 "Not Acceptable".
2013-02-20Correctly extract type='' from unrecognised errorsWill Thompson2-2/+58
2013-02-20tests: define bug base in test_init().Will Thompson2-1/+1
2013-02-15muc: remove prototypes for nonexistant initiate_{async,finish}Will Thompson1-10/+0
2013-02-15Muc: document a load of thingsWill Thompson2-30/+148
Lots of the signals had inline comments describing their parameter lists, but no gtk-doc comments.
2013-02-14Make (more of) WockyMuc docs appearWill Thompson1-5/+6
Astonishingly, putting the instance struct before the class struct makes WockyMuc's signals and properties show up in the generated documentation.
2013-02-13Add vcard namespace constants.Will Thompson1-0/+2
2013-02-13Fix reference to wocky_porter_register_handler()Will Thompson1-6/+9
This was renamed to wocky_porter_register_handler_from(), but its documentation was not updated. Also, the arguments to the function were wrong: there was a NULL where the JID should be, and the JID appeared later in the wrong place. While we're here, fix some formatting earlier on in the same comment. I think using &commat; rather than the <!-- --> trick is more legible.
2013-02-13Fix docs for plural WockyStanzasWill Thompson3-3/+3