Age | Commit message (Collapse) | Author | Files | Lines |
|
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
|
|
|
|
Update the Wocky snaphost and adapt the TLS manager to the changes.
Now the TLS verification functions have an extra argument for the
additional hostnames that we have to consider valid.
This is useful, for instance, when using Google apps. Rather than
providing a certificate for the JID’s domain part, the server provides a
certificate for talk.google.com; if the user has explicitly configured a
‘Google Talk’ account, it's reasonable to accept certificates for this
domain.
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=35395
|
|
its async callback
In principle, we're not meant to assume anything about @result - even
that it's a GSimpleAsyncResult.
(This broke when Wocky changed its source tags from _finish to the
more conventional _async.)
|
|
|
|
|
|
|
|
I received a report of a segfault with the following (trimmed) backtrace:
0 tp_base_channel_constructed () at base-channel.c:604
1 gabble_server_tls_channel_constructed (object=0x1619f8) at server-tls-channel.c:181
[ g_object_new crap ]
5 gabble_server_tls_manager_verify_async ([...]) at server-tls-manager.c:218
6 wocky_tls_handler_verify_async ([...]) at wocky-tls-handler.c:261
7 session_handshake_cb () at wocky-tls-connector.c:302
Line 604 of base-channel.c dereferences the channel's connection for the
first time. This is caused by the connection being NULL, which is
possible because ServerTLSManager's connection_status_changed_cb()
clears it when the connection moves to state DISCONNECTED (to break a
reference cycle). So, the crash occurs if you Disconnect() the
connection before Wocky gets as far as checking the certificate.
So, here we just fail the _verify_async() method call immediately if the
priv->connection is NULL.
Reviewed-by: Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
|
|
So that we can have interactive TLS verification also in the case
'Encryption Required' is False.
|
|
|
|
|
|
|
|
|
|
|
|
These are the only two TpBaseChannel-based channel types which had their
own exported close function which behaves exactly as the vfunc does.
|
|
I have no idea if this works. There are no tests.
|
|
|
|
This also gets rid of the 'retval' variable.
|
|
As when the channel is closed, the manager immediately clears the
reference it owns.
|
|
Also, use a temporary variable to save the function pointer, so that we
can avoid doing the G_OBJECT_CLASS type-check twice in a row.
|
|
In case verify_async() is called multiple times, which is wrong.
|
|
We will clear our reference either when the connection goes DISCONNECTED
or when the channel manager is disposed.
In both cases, tp_clear_object() will take care of doing it right for
us.
|
|
|
|
|