# # # patch "ChangeLog" # from [964ad00f873b9ad5ad214395b5231f039d73d9e8] # to [ff5e6ccc1b720afc5ac21f32c8d42ec6909ff2e2] # # patch "netsync.cc" # from [5184103062fcd8dbdfb741494d49c0d99e8ee988] # to [c4d21be3ffe869bbabd36024cbdb71ece5ed7f7d] # ============================================================ --- ChangeLog 964ad00f873b9ad5ad214395b5231f039d73d9e8 +++ ChangeLog ff5e6ccc1b720afc5ac21f32c8d42ec6909ff2e2 @@ -1,3 +1,7 @@ +2006-01-11 Nathaniel Smith + + * netsync.cc (process_confirm_cmd): Remove. + 2006-01-10 Nathaniel Smith * packet.cc (packet_roundabout_test): Test rdata packets too. ============================================================ --- netsync.cc 5184103062fcd8dbdfb741494d49c0d99e8ee988 +++ netsync.cc c4d21be3ffe869bbabd36024cbdb71ece5ed7f7d @@ -414,7 +414,6 @@ id const & client, id const & nonce1, string const & signature); - bool process_confirm_cmd(string const & signature); bool process_refine_cmd(refinement_type ty, merkle_node const & node); bool process_done_cmd(netcmd_item_type type, size_t n_items); bool process_data_cmd(netcmd_item_type type, @@ -1491,47 +1490,6 @@ return false; } -bool -session::process_confirm_cmd(string const & signature) -{ - I(this->remote_peer_key_hash().size() == constants::merkle_hash_length_in_bytes); - I(this->saved_nonce().size() == constants::merkle_hash_length_in_bytes); - - hexenc their_key_hash; - encode_hexenc(id(remote_peer_key_hash), their_key_hash); - - // nb. this->role is our role, the server is in the opposite role. - L(F("received 'confirm' netcmd from server '%s' for pattern '%s' exclude '%s' in %s mode\n") - % their_key_hash % our_include_pattern % our_exclude_pattern - % (this->role == source_and_sink_role ? _("source and sink") : - (this->role == source_role ? _("sink") : _("source")))); - - // Check their signature. - if (app.db.public_key_exists(their_key_hash)) - { - // Get their public key and check the signature. - rsa_keypair_id their_id; - base64 their_key; - app.db.get_pubkey(their_key_hash, their_id, their_key); - base64 sig; - encode_base64(rsa_sha1_signature(signature), sig); - if (check_signature(app, their_id, their_key, this->saved_nonce(), sig)) - { - L(F("server signature OK, accepting authentication\n")); - return true; - } - else - { - W(F("bad server signature\n")); - } - } - else - { - W(F("unknown server key\n")); - } - return false; -} - bool session::process_refine_cmd(refinement_type ty, merkle_node const & node) {