=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/Attic/sshconnect1.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- src/usr.bin/ssh/Attic/sshconnect1.c 2001/12/27 18:22:16 1.43 +++ src/usr.bin/ssh/Attic/sshconnect1.c 2001/12/27 20:39:58 1.44 @@ -13,7 +13,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect1.c,v 1.43 2001/12/27 18:22:16 markus Exp $"); +RCSID("$OpenBSD: sshconnect1.c,v 1.44 2001/12/27 20:39:58 markus Exp $"); #include #include @@ -109,9 +109,8 @@ type); packet_get_bignum(challenge, &clen); + packet_done(); - packet_integrity_check(plen, clen, type); - debug("Received RSA challenge from server."); /* Ask the agent to decrypt the challenge. */ @@ -244,9 +243,8 @@ if ((challenge = BN_new()) == NULL) fatal("try_rsa_authentication: BN_new failed"); packet_get_bignum(challenge, &clen); + packet_done(); - packet_integrity_check(plen, clen, type); - debug("Received RSA challenge from server."); /* @@ -359,9 +357,8 @@ if ((challenge = BN_new()) == NULL) fatal("try_rhosts_rsa_authentication: BN_new failed"); packet_get_bignum(challenge, &clen); + packet_done(); - packet_integrity_check(plen, clen, type); - debug("Received RSA challenge for host key from server."); /* Compute a response to the challenge. */ @@ -467,7 +464,7 @@ memcpy(auth.dat, reply, auth.length); xfree(reply); - packet_integrity_check(plen, 4 + auth.length, type); + packet_done(); /* * If his response isn't properly encrypted with the session @@ -576,8 +573,7 @@ /* Get server's response. */ ap.data = packet_get_string((unsigned int *) &ap.length); - - packet_integrity_check(payload_len, 4 + ap.length, type); + packet_done(); /* XXX je to dobre? */ problem = krb5_rd_rep(*context, *auth_context, &ap, &reply); @@ -842,7 +838,7 @@ return 0; } challenge = packet_get_string(&clen); - packet_integrity_check(payload_len, (4 + clen), type); + packet_done(); snprintf(prompt, sizeof prompt, "%s%s", challenge, strchr(challenge, '\n') ? "" : "\nResponse: "); xfree(challenge); @@ -968,13 +964,11 @@ supported_ciphers = packet_get_int(); supported_authentications = packet_get_int(); + packet_done(); debug("Received server public key (%d bits) and host key (%d bits).", BN_num_bits(server_key->rsa->n), BN_num_bits(host_key->rsa->n)); - packet_integrity_check(payload_len, - 8 + 4 + sum_len + 0 + 4 + 0 + 0 + 4 + 4 + 4, - SSH_SMSG_PUBLIC_KEY); if (verify_host_key(host, hostaddr, host_key) == -1) fatal("Host key verification failed.");