diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-07-21 10:58:30 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-07-21 10:58:30 +0200 |
commit | f458055e9ce09a1c9b74403156a62fed1a8fbc76 (patch) | |
tree | d7856c0352b42e70bfe7fc65aa13aa39154108f7 /src/gssapi.c | |
parent | 4103358daa728bcb3843e6f9d1b0f2672b76352a (diff) | |
download | libssh-f458055e9ce09a1c9b74403156a62fed1a8fbc76.tar.gz libssh-f458055e9ce09a1c9b74403156a62fed1a8fbc76.tar.xz libssh-f458055e9ce09a1c9b74403156a62fed1a8fbc76.zip |
gssapi: Cleanup ssh_gssapi_set_creds().
Diffstat (limited to 'src/gssapi.c')
-rw-r--r-- | src/gssapi.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/gssapi.c b/src/gssapi.c index 32dd897..c2b642a 100644 --- a/src/gssapi.c +++ b/src/gssapi.c @@ -530,16 +530,23 @@ ssh_gssapi_creds ssh_gssapi_get_creds(ssh_session session){ return (ssh_gssapi_creds)session->gssapi->client_creds; } -/** @brief Set the forwadable ticket to be given to the server for authentication. +/** + * @brief Set the forwadable ticket to be given to the server for authentication. + * * @param[in] creds gssapi credentials handle. */ -void ssh_gssapi_set_creds(ssh_session session, const ssh_gssapi_creds creds){ - if (!session) +void ssh_gssapi_set_creds(ssh_session session, const ssh_gssapi_creds creds) +{ + if (session == NULL) { return; - if(!session->gssapi) + } + if (session->gssapi == NULL) { ssh_gssapi_init(session); - if(!session->gssapi) - return; + if (session->gssapi == NULL) { + return; + } + } + session->gssapi->client.client_deleg_creds = (gss_cred_id_t)creds; } |