[libsoup/wip/tpopela/negotiate] Use the gss_import_name just once per connection
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/wip/tpopela/negotiate] Use the gss_import_name just once per connection
- Date: Tue, 19 Jan 2016 11:11:11 +0000 (UTC)
commit f1f3a0749f84085ea715edd1c235c08a6a2e80bc
Author: Tomas Popela <tpopela redhat com>
Date: Tue Jan 19 12:00:55 2016 +0100
Use the gss_import_name just once per connection
As per https://github.com/krb5/krb5/blob/master/src/tests/gss-threads/gss-client.c#L202
libsoup/soup-auth-negotiate.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-auth-negotiate.c b/libsoup/soup-auth-negotiate.c
index f73aeae..038895b 100644
--- a/libsoup/soup-auth-negotiate.c
+++ b/libsoup/soup-auth-negotiate.c
@@ -41,6 +41,7 @@ typedef struct {
gss_name_t server_name;
gchar *response_header;
+ gboolean initialized;
} SoupNegotiateConnectionState;
static gboolean soup_gss_build_response (SoupNegotiateConnectionState *conn,
@@ -273,7 +274,8 @@ soup_auth_negotiate_class_init (SoupAuthNegotiateClass *auth_negotiate_class)
static gboolean
soup_gss_build_response (SoupNegotiateConnectionState *conn, SoupAuth *auth, GError **err)
{
- if (!soup_gss_client_init (conn, soup_auth_get_host (SOUP_AUTH (auth)), err))
+ if (!conn->initialized &&
+ !soup_gss_client_init (conn, soup_auth_get_host (SOUP_AUTH (auth)), err))
return FALSE;
if (soup_gss_client_step (conn, "", err) != AUTH_GSS_CONTINUE)
@@ -468,6 +470,7 @@ soup_gss_client_init (SoupNegotiateConnectionState *conn, const gchar *host, GEr
goto out;
}
+ conn->initialized = TRUE;
ret = TRUE;
out:
g_free (h);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]