blob: 9351e042819fa99c68327e7ed8067e079d10c88c [file] [log] [blame]
djm@openbsd.org74287f52018-07-31 03:10:27 +00001/* $OpenBSD: auth2-gss.c,v 1.29 2018/07/31 03:10:27 djm Exp $ */
Darren Tucker0efd1552003-08-26 11:49:55 +10002
3/*
4 * Copyright (c) 2001-2003 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
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include "includes.h"
28
Darren Tucker8c6feda2006-08-05 15:24:59 +100029#ifdef GSSAPI
30
Damien Millerd7834352006-08-05 12:39:39 +100031#include <sys/types.h>
Darren Tucker0efd1552003-08-26 11:49:55 +100032
Damien Millerded319c2006-09-01 15:38:36 +100033#include <stdarg.h>
34
Damien Millerd7834352006-08-05 12:39:39 +100035#include "xmalloc.h"
markus@openbsd.orgb8d92142018-07-09 21:37:55 +000036#include "sshkey.h"
Damien Millerd7834352006-08-05 12:39:39 +100037#include "hostfile.h"
Darren Tucker0efd1552003-08-26 11:49:55 +100038#include "auth.h"
39#include "ssh2.h"
Darren Tucker0efd1552003-08-26 11:49:55 +100040#include "log.h"
41#include "dispatch.h"
markus@openbsd.orgb8d92142018-07-09 21:37:55 +000042#include "sshbuf.h"
43#include "ssherr.h"
Darren Tucker450bc112014-07-19 06:23:18 +100044#include "misc.h"
Darren Tucker0efd1552003-08-26 11:49:55 +100045#include "servconf.h"
Darren Tucker0efd1552003-08-26 11:49:55 +100046#include "packet.h"
Darren Tucker0efd1552003-08-26 11:49:55 +100047#include "ssh-gss.h"
Damien Millerd7834352006-08-05 12:39:39 +100048#include "monitor_wrap.h"
Darren Tucker0efd1552003-08-26 11:49:55 +100049
50extern ServerOptions options;
51
markus@openbsd.org2ae666a2017-05-30 14:23:52 +000052static int input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh);
53static int input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh);
54static int input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh);
55static int input_gssapi_errtok(int, u_int32_t, struct ssh *);
Darren Tucker0efd1552003-08-26 11:49:55 +100056
57/*
58 * We only support those mechanisms that we know about (ie ones that we know
Damien Miller6fd6def2005-11-05 15:07:05 +110059 * how to check local user kuserok and the like)
Darren Tucker0efd1552003-08-26 11:49:55 +100060 */
61static int
markus@openbsd.orgeb272ea2017-05-30 14:29:59 +000062userauth_gssapi(struct ssh *ssh)
Darren Tucker0efd1552003-08-26 11:49:55 +100063{
markus@openbsd.orgeb272ea2017-05-30 14:29:59 +000064 Authctxt *authctxt = ssh->authctxt;
Darren Tucker3f9fdc72004-06-22 12:56:01 +100065 gss_OID_desc goid = {0, NULL};
Darren Tucker0efd1552003-08-26 11:49:55 +100066 Gssctxt *ctxt = NULL;
markus@openbsd.orgb8d92142018-07-09 21:37:55 +000067 int r, present;
68 u_int mechs;
Darren Tucker0efd1552003-08-26 11:49:55 +100069 OM_uint32 ms;
markus@openbsd.orgb8d92142018-07-09 21:37:55 +000070 size_t len;
Damien Millereccb9de2005-06-17 12:59:34 +100071 u_char *doid = NULL;
Darren Tucker0efd1552003-08-26 11:49:55 +100072
markus@openbsd.orgb8d92142018-07-09 21:37:55 +000073 if ((r = sshpkt_get_u32(ssh, &mechs)) != 0)
74 fatal("%s: %s", __func__, ssh_err(r));
75
Darren Tucker0efd1552003-08-26 11:49:55 +100076 if (mechs == 0) {
77 debug("Mechanism negotiation is not supported");
78 return (0);
79 }
80
Darren Tucker0efd1552003-08-26 11:49:55 +100081 do {
82 mechs--;
83
Darren Tuckera627d422013-06-02 07:31:17 +100084 free(doid);
Darren Tucker0efd1552003-08-26 11:49:55 +100085
Darren Tucker655a5e02003-11-03 20:09:03 +110086 present = 0;
markus@openbsd.orgb8d92142018-07-09 21:37:55 +000087 if ((r = sshpkt_get_string(ssh, &doid, &len)) != 0)
88 fatal("%s: %s", __func__, ssh_err(r));
Darren Tucker0efd1552003-08-26 11:49:55 +100089
Damien Miller0dc1bef2005-07-17 17:22:45 +100090 if (len > 2 && doid[0] == SSH_GSS_OIDTYPE &&
91 doid[1] == len - 2) {
Darren Tucker3f9fdc72004-06-22 12:56:01 +100092 goid.elements = doid + 2;
93 goid.length = len - 2;
Damien Millere6a74ae2014-02-27 10:17:49 +110094 ssh_gssapi_test_oid_supported(&ms, &goid, &present);
Darren Tucker0efd1552003-08-26 11:49:55 +100095 } else {
Darren Tucker655a5e02003-11-03 20:09:03 +110096 logit("Badly formed OID received");
Darren Tucker0efd1552003-08-26 11:49:55 +100097 }
Darren Tucker0efd1552003-08-26 11:49:55 +100098 } while (mechs > 0 && !present);
99
Darren Tucker0efd1552003-08-26 11:49:55 +1000100 if (!present) {
Darren Tuckera627d422013-06-02 07:31:17 +1000101 free(doid);
Damien Miller3fcdfd52011-05-05 14:04:11 +1000102 authctxt->server_caused_failure = 1;
Darren Tucker0efd1552003-08-26 11:49:55 +1000103 return (0);
104 }
105
djm@openbsd.org74287f52018-07-31 03:10:27 +0000106 if (!authctxt->valid || authctxt->user == NULL) {
107 debug2("%s: disabled because of invalid user", __func__);
108 free(doid);
109 return (0);
110 }
111
Darren Tucker3f9fdc72004-06-22 12:56:01 +1000112 if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, &goid)))) {
Damien Millerf23c0962006-03-26 00:04:53 +1100113 if (ctxt != NULL)
114 ssh_gssapi_delete_ctx(&ctxt);
Darren Tuckera627d422013-06-02 07:31:17 +1000115 free(doid);
Damien Miller3fcdfd52011-05-05 14:04:11 +1000116 authctxt->server_caused_failure = 1;
Darren Tucker0efd1552003-08-26 11:49:55 +1000117 return (0);
Damien Miller982d3262003-09-02 22:59:01 +1000118 }
Darren Tucker0efd1552003-08-26 11:49:55 +1000119
Damien Miller6fd6def2005-11-05 15:07:05 +1100120 authctxt->methoddata = (void *)ctxt;
Darren Tucker0efd1552003-08-26 11:49:55 +1000121
Darren Tucker655a5e02003-11-03 20:09:03 +1100122 /* Return the OID that we received */
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000123 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_GSSAPI_RESPONSE)) != 0 ||
124 (r = sshpkt_put_string(ssh, doid, len)) != 0 ||
125 (r = sshpkt_send(ssh)) != 0)
126 fatal("%s: %s", __func__, ssh_err(r));
Darren Tucker0efd1552003-08-26 11:49:55 +1000127
Darren Tuckera627d422013-06-02 07:31:17 +1000128 free(doid);
Darren Tucker0efd1552003-08-26 11:49:55 +1000129
markus@openbsd.orgeb272ea2017-05-30 14:29:59 +0000130 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, &input_gssapi_token);
131 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, &input_gssapi_errtok);
Darren Tucker0efd1552003-08-26 11:49:55 +1000132 authctxt->postponed = 1;
133
134 return (0);
135}
136
markus@openbsd.org3fdc88a2015-01-19 20:07:45 +0000137static int
markus@openbsd.org2ae666a2017-05-30 14:23:52 +0000138input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh)
Darren Tucker0efd1552003-08-26 11:49:55 +1000139{
markus@openbsd.org5f4082d2017-05-30 14:18:15 +0000140 Authctxt *authctxt = ssh->authctxt;
Darren Tucker0efd1552003-08-26 11:49:55 +1000141 Gssctxt *gssctxt;
142 gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
143 gss_buffer_desc recv_tok;
Damien Miller0425d402003-11-17 22:18:21 +1100144 OM_uint32 maj_status, min_status, flags;
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000145 u_char *p;
146 size_t len;
147 int r;
Darren Tucker0efd1552003-08-26 11:49:55 +1000148
149 if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
150 fatal("No authentication or GSSAPI context");
151
152 gssctxt = authctxt->methoddata;
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000153 if ((r = sshpkt_get_string(ssh, &p, &len)) != 0 ||
154 (r = sshpkt_get_end(ssh)) != 0)
155 fatal("%s: %s", __func__, ssh_err(r));
Darren Tucker0efd1552003-08-26 11:49:55 +1000156
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000157 recv_tok.value = p;
158 recv_tok.length = len;
Darren Tucker0efd1552003-08-26 11:49:55 +1000159 maj_status = PRIVSEP(ssh_gssapi_accept_ctx(gssctxt, &recv_tok,
Damien Miller0425d402003-11-17 22:18:21 +1100160 &send_tok, &flags));
Darren Tucker0efd1552003-08-26 11:49:55 +1000161
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000162 free(p);
Darren Tucker0efd1552003-08-26 11:49:55 +1000163
164 if (GSS_ERROR(maj_status)) {
165 if (send_tok.length != 0) {
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000166 if ((r = sshpkt_start(ssh,
167 SSH2_MSG_USERAUTH_GSSAPI_ERRTOK)) != 0 ||
168 (r = sshpkt_put_string(ssh, send_tok.value,
169 send_tok.length)) != 0 ||
170 (r = sshpkt_send(ssh)) != 0)
171 fatal("%s: %s", __func__, ssh_err(r));
Darren Tucker0efd1552003-08-26 11:49:55 +1000172 }
173 authctxt->postponed = 0;
markus@openbsd.orgeb272ea2017-05-30 14:29:59 +0000174 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
175 userauth_finish(ssh, 0, "gssapi-with-mic", NULL);
Darren Tucker0efd1552003-08-26 11:49:55 +1000176 } else {
177 if (send_tok.length != 0) {
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000178 if ((r = sshpkt_start(ssh,
179 SSH2_MSG_USERAUTH_GSSAPI_TOKEN)) != 0 ||
180 (r = sshpkt_put_string(ssh, send_tok.value,
181 send_tok.length)) != 0 ||
182 (r = sshpkt_send(ssh)) != 0)
183 fatal("%s: %s", __func__, ssh_err(r));
Darren Tucker0efd1552003-08-26 11:49:55 +1000184 }
185 if (maj_status == GSS_S_COMPLETE) {
markus@openbsd.orgeb272ea2017-05-30 14:29:59 +0000186 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
Damien Miller0425d402003-11-17 22:18:21 +1100187 if (flags & GSS_C_INTEG_FLAG)
markus@openbsd.orgeb272ea2017-05-30 14:29:59 +0000188 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_MIC,
Damien Miller0425d402003-11-17 22:18:21 +1100189 &input_gssapi_mic);
190 else
markus@openbsd.orgeb272ea2017-05-30 14:29:59 +0000191 ssh_dispatch_set(ssh,
Damien Miller0425d402003-11-17 22:18:21 +1100192 SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE,
193 &input_gssapi_exchange_complete);
Darren Tucker0efd1552003-08-26 11:49:55 +1000194 }
195 }
196
197 gss_release_buffer(&min_status, &send_tok);
markus@openbsd.org3fdc88a2015-01-19 20:07:45 +0000198 return 0;
Darren Tucker0efd1552003-08-26 11:49:55 +1000199}
200
markus@openbsd.org3fdc88a2015-01-19 20:07:45 +0000201static int
markus@openbsd.org2ae666a2017-05-30 14:23:52 +0000202input_gssapi_errtok(int type, u_int32_t plen, struct ssh *ssh)
Darren Tucker0efd1552003-08-26 11:49:55 +1000203{
markus@openbsd.org5f4082d2017-05-30 14:18:15 +0000204 Authctxt *authctxt = ssh->authctxt;
Darren Tucker0efd1552003-08-26 11:49:55 +1000205 Gssctxt *gssctxt;
206 gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
207 gss_buffer_desc recv_tok;
208 OM_uint32 maj_status;
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000209 int r;
djm@openbsd.org0f3958c2018-07-10 09:13:30 +0000210 u_char *p;
211 size_t len;
Darren Tucker0efd1552003-08-26 11:49:55 +1000212
213 if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
214 fatal("No authentication or GSSAPI context");
215
216 gssctxt = authctxt->methoddata;
djm@openbsd.org0f3958c2018-07-10 09:13:30 +0000217 if ((r = sshpkt_get_string(ssh, &p, &len)) != 0 ||
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000218 (r = sshpkt_get_end(ssh)) != 0)
219 fatal("%s: %s", __func__, ssh_err(r));
djm@openbsd.org0f3958c2018-07-10 09:13:30 +0000220 recv_tok.value = p;
221 recv_tok.length = len;
Darren Tucker0efd1552003-08-26 11:49:55 +1000222
223 /* Push the error token into GSSAPI to see what it says */
224 maj_status = PRIVSEP(ssh_gssapi_accept_ctx(gssctxt, &recv_tok,
225 &send_tok, NULL));
226
Darren Tuckera627d422013-06-02 07:31:17 +1000227 free(recv_tok.value);
Darren Tucker0efd1552003-08-26 11:49:55 +1000228
229 /* We can't return anything to the client, even if we wanted to */
markus@openbsd.orgeb272ea2017-05-30 14:29:59 +0000230 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
231 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
Darren Tucker0efd1552003-08-26 11:49:55 +1000232
233 /* The client will have already moved on to the next auth */
234
235 gss_release_buffer(&maj_status, &send_tok);
markus@openbsd.org3fdc88a2015-01-19 20:07:45 +0000236 return 0;
Darren Tucker0efd1552003-08-26 11:49:55 +1000237}
238
239/*
240 * This is called when the client thinks we've completed authentication.
241 * It should only be enabled in the dispatch handler by the function above,
242 * which only enables it once the GSSAPI exchange is complete.
243 */
244
markus@openbsd.org3fdc88a2015-01-19 20:07:45 +0000245static int
markus@openbsd.org2ae666a2017-05-30 14:23:52 +0000246input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh)
Darren Tucker0efd1552003-08-26 11:49:55 +1000247{
markus@openbsd.org5f4082d2017-05-30 14:18:15 +0000248 Authctxt *authctxt = ssh->authctxt;
djm@openbsd.org0f3958c2018-07-10 09:13:30 +0000249 int r, authenticated;
djm@openbsd.org8f574952017-06-24 06:34:38 +0000250 const char *displayname;
Darren Tucker0efd1552003-08-26 11:49:55 +1000251
252 if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
253 fatal("No authentication or GSSAPI context");
254
Darren Tucker0efd1552003-08-26 11:49:55 +1000255 /*
Damien Miller0425d402003-11-17 22:18:21 +1100256 * We don't need to check the status, because we're only enabled in
257 * the dispatcher once the exchange is complete
Darren Tucker0efd1552003-08-26 11:49:55 +1000258 */
259
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000260 if ((r = sshpkt_get_end(ssh)) != 0)
261 fatal("%s: %s", __func__, ssh_err(r));
Darren Tucker0efd1552003-08-26 11:49:55 +1000262
263 authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user));
264
djm@openbsd.org8f574952017-06-24 06:34:38 +0000265 if ((!use_privsep || mm_is_monitor()) &&
266 (displayname = ssh_gssapi_displayname()) != NULL)
267 auth2_record_info(authctxt, "%s", displayname);
268
Darren Tucker0efd1552003-08-26 11:49:55 +1000269 authctxt->postponed = 0;
markus@openbsd.orgeb272ea2017-05-30 14:29:59 +0000270 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
271 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
272 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL);
273 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
274 userauth_finish(ssh, authenticated, "gssapi-with-mic", NULL);
markus@openbsd.org3fdc88a2015-01-19 20:07:45 +0000275 return 0;
Damien Miller0425d402003-11-17 22:18:21 +1100276}
277
markus@openbsd.org3fdc88a2015-01-19 20:07:45 +0000278static int
markus@openbsd.org2ae666a2017-05-30 14:23:52 +0000279input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh)
Damien Miller0425d402003-11-17 22:18:21 +1100280{
markus@openbsd.org5f4082d2017-05-30 14:18:15 +0000281 Authctxt *authctxt = ssh->authctxt;
Damien Miller0425d402003-11-17 22:18:21 +1100282 Gssctxt *gssctxt;
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000283 int r, authenticated = 0;
284 struct sshbuf *b;
Damien Miller0425d402003-11-17 22:18:21 +1100285 gss_buffer_desc mic, gssbuf;
djm@openbsd.org8f574952017-06-24 06:34:38 +0000286 const char *displayname;
djm@openbsd.org0f3958c2018-07-10 09:13:30 +0000287 u_char *p;
288 size_t len;
Damien Miller787b2ec2003-11-21 23:56:47 +1100289
Damien Miller0425d402003-11-17 22:18:21 +1100290 if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
291 fatal("No authentication or GSSAPI context");
Damien Miller787b2ec2003-11-21 23:56:47 +1100292
Damien Miller0425d402003-11-17 22:18:21 +1100293 gssctxt = authctxt->methoddata;
Damien Miller787b2ec2003-11-21 23:56:47 +1100294
djm@openbsd.org0f3958c2018-07-10 09:13:30 +0000295 if ((r = sshpkt_get_string(ssh, &p, &len)) != 0)
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000296 fatal("%s: %s", __func__, ssh_err(r));
297 if ((b = sshbuf_new()) == NULL)
298 fatal("%s: sshbuf_new failed", __func__);
djm@openbsd.org0f3958c2018-07-10 09:13:30 +0000299 mic.value = p;
300 mic.length = len;
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000301 ssh_gssapi_buildmic(b, authctxt->user, authctxt->service,
Damien Miller0425d402003-11-17 22:18:21 +1100302 "gssapi-with-mic");
Damien Miller787b2ec2003-11-21 23:56:47 +1100303
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000304 if ((gssbuf.value = sshbuf_mutable_ptr(b)) == NULL)
305 fatal("%s: sshbuf_mutable_ptr failed", __func__);
306 gssbuf.length = sshbuf_len(b);
Damien Miller787b2ec2003-11-21 23:56:47 +1100307
Damien Miller0425d402003-11-17 22:18:21 +1100308 if (!GSS_ERROR(PRIVSEP(ssh_gssapi_checkmic(gssctxt, &gssbuf, &mic))))
309 authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user));
310 else
311 logit("GSSAPI MIC check failed");
312
markus@openbsd.orgb8d92142018-07-09 21:37:55 +0000313 sshbuf_free(b);
Darren Tuckera627d422013-06-02 07:31:17 +1000314 free(mic.value);
Damien Miller787b2ec2003-11-21 23:56:47 +1100315
djm@openbsd.org8f574952017-06-24 06:34:38 +0000316 if ((!use_privsep || mm_is_monitor()) &&
317 (displayname = ssh_gssapi_displayname()) != NULL)
318 auth2_record_info(authctxt, "%s", displayname);
319
Damien Miller0425d402003-11-17 22:18:21 +1100320 authctxt->postponed = 0;
markus@openbsd.orgeb272ea2017-05-30 14:29:59 +0000321 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
322 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
323 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL);
324 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
325 userauth_finish(ssh, authenticated, "gssapi-with-mic", NULL);
markus@openbsd.org3fdc88a2015-01-19 20:07:45 +0000326 return 0;
Darren Tucker0efd1552003-08-26 11:49:55 +1000327}
328
329Authmethod method_gssapi = {
Damien Miller0425d402003-11-17 22:18:21 +1100330 "gssapi-with-mic",
Darren Tucker0efd1552003-08-26 11:49:55 +1000331 userauth_gssapi,
332 &options.gss_authentication
333};
Darren Tucker8c6feda2006-08-05 15:24:59 +1000334
335#endif /* GSSAPI */