Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Now that we use real gss_buffer_ts, there's no need to muck about with
Browse files Browse the repository at this point in the history
casts when passing them to GSS-API functions.  Removing them makes the code
more readable and allows better type-checking.


git-svn-id: svn://svn.tartarus.org/sgt/putty@8333 cda61777-01e9-0310-a592-d414129be87e
  • Loading branch information
ben committed Nov 25, 2008
1 parent a638600 commit c677cad
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions unix/uxgss.c
Expand Up @@ -84,9 +84,9 @@ Ssh_gss_stat ssh_gss_init_sec_context(Ssh_gss_ctx *ctx,
GSS_C_INTEG_FLAG | to_deleg,
0,
GSS_C_NO_CHANNEL_BINDINGS,
(gss_buffer_desc *)recv_tok,
recv_tok,
NULL, /* ignore mech type */
(gss_buffer_desc *)send_tok,
send_tok,
&ret_flags,
NULL); /* ignore time_rec */

Expand Down Expand Up @@ -139,7 +139,7 @@ Ssh_gss_stat ssh_gss_display_status(Ssh_gss_ctx ctx, Ssh_gss_buf *buf)
Ssh_gss_stat ssh_gss_free_tok(Ssh_gss_buf *send_tok)
{
OM_uint32 min_stat,maj_stat;
maj_stat = gss_release_buffer(&min_stat, (gss_buffer_desc *)send_tok);
maj_stat = gss_release_buffer(&min_stat, send_tok);

if (maj_stat == GSS_S_COMPLETE) return SSH_GSS_OK;
return SSH_GSS_FAILURE;
Expand Down Expand Up @@ -175,11 +175,7 @@ Ssh_gss_stat ssh_gss_get_mic(Ssh_gss_ctx ctx, Ssh_gss_buf *buf,
{
uxSsh_gss_ctx *uxctx = (uxSsh_gss_ctx *) ctx;
if (uxctx == NULL) return SSH_GSS_FAILURE;
return gss_get_mic(&(uxctx->min_stat),
uxctx->ctx,
0,
(gss_buffer_desc *)buf,
(gss_buffer_desc *)hash);
return gss_get_mic(&(uxctx->min_stat), uxctx->ctx, 0, buf, hash);
}

Ssh_gss_stat ssh_gss_free_mic(Ssh_gss_buf *hash)
Expand Down

0 comments on commit c677cad

Please sign in to comment.