ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/connection.C
(Generate patch)

Comparing gvpe/src/connection.C (file contents):
Revision 1.47 by pcg, Mon Mar 7 01:31:26 2005 UTC vs.
Revision 1.49 by pcg, Sat Mar 12 18:10:40 2005 UTC

478{ 478{
479 prot_major = PROTOCOL_MAJOR; 479 prot_major = PROTOCOL_MAJOR;
480 prot_minor = PROTOCOL_MINOR; 480 prot_minor = PROTOCOL_MINOR;
481 randsize = RAND_SIZE; 481 randsize = RAND_SIZE;
482 hmaclen = HMACLENGTH; 482 hmaclen = HMACLENGTH;
483 flags = ENABLE_COMPRESSION ? 0x81 : 0x80; 483 flags = 0;
484 challengelen = sizeof (rsachallenge); 484 challengelen = sizeof (rsachallenge);
485 features = get_features (); 485 features = get_features ();
486 486
487 cipher_nid = htonl (EVP_CIPHER_nid (CIPHER)); 487 cipher_nid = htonl (EVP_CIPHER_nid (CIPHER));
488 digest_nid = htonl (EVP_MD_type (RSA_HASH)); 488 digest_nid = htonl (EVP_MD_type (RSA_HASH));
498 slog (L_WARN, _("major version mismatch (remote %d <=> local %d)"), prot_major, PROTOCOL_MAJOR); 498 slog (L_WARN, _("major version mismatch (remote %d <=> local %d)"), prot_major, PROTOCOL_MAJOR);
499 else if (randsize != RAND_SIZE) 499 else if (randsize != RAND_SIZE)
500 slog (L_WARN, _("rand size mismatch (remote %d <=> local %d)"), randsize, RAND_SIZE); 500 slog (L_WARN, _("rand size mismatch (remote %d <=> local %d)"), randsize, RAND_SIZE);
501 else if (hmaclen != HMACLENGTH) 501 else if (hmaclen != HMACLENGTH)
502 slog (L_WARN, _("hmac length mismatch (remote %d <=> local %d)"), hmaclen, HMACLENGTH); 502 slog (L_WARN, _("hmac length mismatch (remote %d <=> local %d)"), hmaclen, HMACLENGTH);
503#if 0 // this implementation should handle all flag settings
504 else if (flags != curflags ())
505 slog (L_WARN, _("flag mismatch (remote %x <=> local %x)"), flags, curflags ());
506#endif
507 else if (challengelen != sizeof (rsachallenge)) 503 else if (challengelen != sizeof (rsachallenge))
508 slog (L_WARN, _("challenge length mismatch (remote %d <=> local %d)"), challengelen, sizeof (rsachallenge)); 504 slog (L_WARN, _("challenge length mismatch (remote %d <=> local %d)"), challengelen, sizeof (rsachallenge));
509 else if (cipher_nid != htonl (EVP_CIPHER_nid (CIPHER))) 505 else if (cipher_nid != htonl (EVP_CIPHER_nid (CIPHER)))
510 slog (L_WARN, _("cipher mismatch (remote %x <=> local %x)"), ntohl (cipher_nid), EVP_CIPHER_nid (CIPHER)); 506 slog (L_WARN, _("cipher mismatch (remote %x <=> local %x)"), ntohl (cipher_nid), EVP_CIPHER_nid (CIPHER));
511 else if (digest_nid != htonl (EVP_MD_type (RSA_HASH))) 507 else if (digest_nid != htonl (EVP_MD_type (RSA_HASH)))
772 else 768 else
773 send_ping (dsi, 0); 769 send_ping (dsi, 0);
774 } 770 }
775 } 771 }
776 772
777 retry_int *= slow ? 3. : 0.7; 773 retry_int *= slow ? 8. : 0.7;
778 774
779 if (retry_int < conf->max_retry) 775 if (retry_int < conf->max_retry)
780 retry_cnt++; 776 retry_cnt++;
781 else 777 else
782 retry_int = conf->max_retry; 778 retry_int = conf->max_retry;
948 delete octx; 944 delete octx;
949 945
950 octx = new crypto_ctx (k, 1); 946 octx = new crypto_ctx (k, 1);
951 oseqno = ntohl (*(u32 *)&k[CHG_SEQNO]) & 0x7fffffff; 947 oseqno = ntohl (*(u32 *)&k[CHG_SEQNO]) & 0x7fffffff;
952 948
953 // compatibility code, remove when no longer required
954 if (p->flags & 1) p->features |= FEATURE_COMPRESSION;
955
956 conf->protocols = p->protocols; 949 conf->protocols = p->protocols;
957 features = p->features & config_packet::get_features (); 950 features = p->features & config_packet::get_features ();
958 951
959 send_auth_response (rsi, p->id, k); 952 send_auth_response (rsi, p->id, k);
960 953

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines