-int
-userauth_external(Authctxt *authctxt)
-{
- static int attempt = 0;
-
- if (attempt++ >= 1)
- return 0;
-
- /* The client MUST NOT try this method if initial key exchange
- was not performed using a GSSAPI-based key exchange
- method. */
- if (gss_kex_context == NULL) {
- debug2("gsskex not performed, skipping external-keyx");
- return 0;
- }
-
- debug2("userauth_external");
- packet_start(SSH2_MSG_USERAUTH_REQUEST);
-#ifdef GSI
- if (options.implicit && is_gsi_oid(gss_kex_context->oid)) {
- packet_put_cstring("");
- } else {
-#endif
- packet_put_cstring(authctxt->server_user);
-#ifdef GSI
- }
-#endif
- packet_put_cstring(authctxt->service);
- packet_put_cstring(authctxt->method->name);
- packet_send();
- packet_write_wait();
- return 1;
-}