Diff

Differences From Artifact [e5c3346967]:

To Artifact [442b9afece]:


937
938
939
940
941
942
943







944
945
946
947
948
949
950
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957







+
+
+
+
+
+
+







    long next_rekey, last_rekey;
    char *deferred_rekey_reason;    /* points to STATIC string; don't free */

    /*
     * Fully qualified host name, which we need if doing GSSAPI.
     */
    char *fullhostname;

#ifndef NO_GSSAPI
    /*
     * GSSAPI libraries for this session.
     */
    struct ssh_gss_liblist *gsslibs;
#endif
};

#define logevent(s) logevent(ssh->frontend, s)

/* logevent, only printf-formatted. */
static void logeventf(Ssh ssh, const char *fmt, ...)
{
7641
7642
7643
7644
7645
7646
7647
7648
7649



7650
7651
7652

7653
7654
7655
7656
7657
7658
7659
7648
7649
7650
7651
7652
7653
7654


7655
7656
7657
7658
7659

7660
7661
7662
7663
7664
7665
7666
7667







-
-
+
+
+


-
+








		s->can_pubkey =
		    in_commasep_string("publickey", methods, methlen);
		s->can_passwd =
		    in_commasep_string("password", methods, methlen);
		s->can_keyb_inter = ssh->cfg.try_ki_auth &&
		    in_commasep_string("keyboard-interactive", methods, methlen);
#ifndef NO_GSSAPI		
		ssh_gss_init();
#ifndef NO_GSSAPI
		if (!ssh->gsslibs)
		    ssh->gsslibs = ssh_gss_setup(&ssh->cfg);
		s->can_gssapi = ssh->cfg.try_gssapi_auth &&
		    in_commasep_string("gssapi-with-mic", methods, methlen) &&
		    n_ssh_gss_libraries > 0;
		    ssh->gsslibs->nlibraries > 0;
#endif
	    }

	    ssh->pkt_actx = SSH2_PKTCTX_NOAUTH;

	    if (s->can_pubkey && !s->done_agent && s->nkeys) {

7997
7998
7999
8000
8001
8002
8003
8004
8005
8006



8007
8008
8009
8010
8011
8012
8013
8005
8006
8007
8008
8009
8010
8011



8012
8013
8014
8015
8016
8017
8018
8019
8020
8021







-
-
-
+
+
+







		 * list.
		 */
		{
		    int i, j;
		    s->gsslib = NULL;
		    for (i = 0; i < ngsslibs; i++) {
			int want_id = ssh->cfg.ssh_gsslist[i];
			for (j = 0; j < n_ssh_gss_libraries; j++)
			    if (ssh_gss_libraries[j].id == want_id) {
				s->gsslib = &ssh_gss_libraries[j];
			for (j = 0; j < ssh->gsslibs->nlibraries; j++)
			    if (ssh->gsslibs->libraries[j].id == want_id) {
				s->gsslib = &ssh->gsslibs->libraries[j];
				goto got_gsslib;   /* double break */
			    }
		    }
		    got_gsslib:
		    /*
		     * We always expect to have found something in
		     * the above loop: we only came here if there
9278
9279
9280
9281
9282
9283
9284




9285
9286
9287
9288
9289
9290
9291
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303







+
+
+
+








    ssh->pinger = NULL;

    ssh->incoming_data_size = ssh->outgoing_data_size =
	ssh->deferred_data_size = 0L;
    ssh->max_data_size = parse_blocksize(ssh->cfg.ssh_rekey_data);
    ssh->kex_in_progress = FALSE;

#ifndef NO_GSSAPI
    ssh->gsslibs = NULL;
#endif

    p = connect_to_host(ssh, host, port, realhost, nodelay, keepalive);
    if (p != NULL)
	return p;

    random_ref();

9375
9376
9377
9378
9379
9380
9381




9382
9383
9384
9385
9386
9387
9388
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404







+
+
+
+







    }
    if (ssh->s)
	ssh_do_close(ssh, TRUE);
    expire_timer_context(ssh);
    if (ssh->pinger)
	pinger_free(ssh->pinger);
    bufchain_clear(&ssh->queued_incoming_data);
#ifndef NO_GSSAPI
    if (ssh->gsslibs)
	ssh_gss_cleanup(ssh->gsslibs);
#endif
    sfree(ssh);

    random_unref();
}

/*
 * Reconfigure the SSH backend.