Deleted Added
sdiff udiff text old ( 181110 ) new ( 181111 )
full compact
1/* $OpenBSD: gss-genr.c,v 1.19 2007/06/12 11:56:15 dtucker Exp $ */
2
3/*
4 * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the

--- 89 unchanged lines hidden (view full) ---

102 *major_status = ctxt->major;
103 if (minor_status != NULL)
104 *minor_status = ctxt->minor;
105
106 ctx = 0;
107 /* The GSSAPI error */
108 do {
109 gss_display_status(&lmin, ctxt->major,
110 GSS_C_GSS_CODE, ctxt->oid, &ctx, &msg);
111
112 buffer_append(&b, msg.value, msg.length);
113 buffer_put_char(&b, '\n');
114
115 gss_release_buffer(&lmin, &msg);
116 } while (ctx != 0);
117
118 /* The mechanism specific error */
119 do {
120 gss_display_status(&lmin, ctxt->minor,
121 GSS_C_MECH_CODE, ctxt->oid, &ctx, &msg);
122
123 buffer_append(&b, msg.value, msg.length);
124 buffer_put_char(&b, '\n');
125
126 gss_release_buffer(&lmin, &msg);
127 } while (ctx != 0);
128
129 buffer_put_char(&b, '\0');

--- 91 unchanged lines hidden (view full) ---

221 if ((ctx->major = gss_import_name(&ctx->minor,
222 &gssbuf, GSS_C_NT_HOSTBASED_SERVICE, &ctx->name)))
223 ssh_gssapi_error(ctx);
224
225 xfree(gssbuf.value);
226 return (ctx->major);
227}
228
229OM_uint32
230ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_t buffer, gss_buffer_t hash)
231{
232 if ((ctx->major = gss_get_mic(&ctx->minor, ctx->context,
233 GSS_C_QOP_DEFAULT, buffer, hash)))
234 ssh_gssapi_error(ctx);
235
236 return (ctx->major);
237}

--- 5 unchanged lines hidden (view full) ---

243 buffer_init(b);
244 buffer_put_string(b, session_id2, session_id2_len);
245 buffer_put_char(b, SSH2_MSG_USERAUTH_REQUEST);
246 buffer_put_cstring(b, user);
247 buffer_put_cstring(b, service);
248 buffer_put_cstring(b, context);
249}
250
251int
252ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host)
253{
254 gss_buffer_desc token = GSS_C_EMPTY_BUFFER;
255 OM_uint32 major, minor;
256 gss_OID_desc spnego_oid = {6, (void *)"\x2B\x06\x01\x05\x05\x02"};
257
258 /* RFC 4462 says we MUST NOT do SPNEGO */

--- 23 unchanged lines hidden ---