Committer: Diego Biurrun <diego@xxxxxxxxxx> Date: 12/04/2010 at 18:40:53 Revision: 4236 Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: trunk Log: dead code removal: part I (test subdirectory) Modified: M test/conntest.c M test/dh_performance.c M test/dhtteststub.c === modified file 'test/conntest.c' --- test/conntest.c 2010-04-09 15:20:38 +0000 +++ test/conntest.c 2010-04-12 15:40:34 +0000 @@ -771,9 +771,6 @@ */ int main_client_native(int socktype, char *peer_name, char *peer_port_name) { - //struct endpointinfo hints, *epinfo = NULL, *res = NULL; - //struct endpointinfo *epinfo; - //struct addrinfo hints, *res = NULL; struct timeval stats_before, stats_after; struct sockaddr_hip peer_sock; unsigned long stats_diff_sec, stats_diff_usec; === modified file 'test/dh_performance.c' --- test/dh_performance.c 2010-04-09 17:56:34 +0000 +++ test/dh_performance.c 2010-04-12 15:40:34 +0000 @@ -26,9 +26,6 @@ #include "lib/core/hashchain.h" #include "lib/core/performance.h" -//int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh); - - /*! \brief Number of benchmark runs */ #define DHP_DEFAULT_LOOPS 100 @@ -407,7 +404,6 @@ printf( "-------------------------------\n" "RSA performance test\n" "-------------------------------\n\n"); - //impl_dsa_sign(uint8_t *digest, uint8_t *private_key, uint8_t *signature) rsa_key_pool = malloc(sw_create_rsa * sizeof(RSA *)); @@ -432,8 +428,6 @@ } if (sw_print_keys == TRUE) { printf("\nKey %d\n", i + 1); - } else { - //dhp_load_progress(i, sw_create_dsa, 50); } } @@ -485,12 +479,6 @@ if (!err) { printf("RSA signature is crap\n"); } - - - if (sw_print_keys) { - // HIP_DEBUG("DSAsig.r: %s\n", BN_bn2hex(dsa_sig_pool[i]->r)); - // HIP_DEBUG("DSAsig.s: %s\n", BN_bn2hex(dsa_sig_pool[i]->s)); - } } bench_secs = dhp_stop_benchmark(&bench_time); printf("\n"); @@ -518,10 +506,6 @@ hip_perf_stop_benchmark(perf_set, PS_RSA_VERIFY); hip_perf_write_benchmark(perf_set, PS_RSA_VERIFY); } - if (sw_print_keys) { - //HIP_DEBUG("DSAsig.r: %s\n", BN_bn2hex(dsa_sig_pool[i]->r)); - //HIP_DEBUG("DSAsig.s: %s\n", BN_bn2hex(dsa_sig_pool[i]->s)); - } } bench_secs = dhp_stop_benchmark(&bench_time); printf("\n"); @@ -533,7 +517,6 @@ printf( "-------------------------------\n" "DSA performance test\n" "-------------------------------\n\n"); - //impl_dsa_sign(uint8_t *digest, uint8_t *private_key, uint8_t *signature) dsa_key_pool = malloc(sw_create_dsa * sizeof(DSA *)); printf("Creating key pool of %d keys of length %d.\n", @@ -558,8 +541,6 @@ printf("\nKey %d\n", i + 1); printf("pub_key =%s\n", BN_bn2hex(dsa_key_pool[i]->pub_key)); printf("priv_key =%s\n", BN_bn2hex(dsa_key_pool[i]->priv_key)); - } else { - //dhp_load_progress(i, sw_create_dsa, 50); } } @@ -684,8 +665,6 @@ printf("\nKey %d\n", i + 1); printf("pub_key =%s\n", BN_bn2hex(dh_key_pool[i]->pub_key)); printf("priv_key =%s\n", BN_bn2hex(dh_key_pool[i]->priv_key)); - } else { - //dhp_load_progress(i, sw_create_dh, 50); } } printf("\n"); === modified file 'test/dhtteststub.c' --- test/dhtteststub.c 2010-04-09 16:24:44 +0000 +++ test/dhtteststub.c 2010-04-12 15:40:34 +0000 @@ -34,10 +34,6 @@ { int s = 0, ret, error; int ttl = 240; - /* - * struct in6_addr val_hit_addr; - * struct in6_addr val_ip_addr; - */ char opendht[] = "193.167.187.134"; //char opendht[] = "193.167.187.130"; //char opendht[] = "opendht.nyuld.net"; @@ -175,7 +171,6 @@ (unsigned char *) host_addr, port); ret = opendht_read_response(s, dht_response); ret = handle_hit_value(dht_response, (void *) dht_response2); - // if (ret == -1) exit (1); HIP_DEBUG("Get packet (fqdn) sent and ...\n"); if (ret == 0) { HIP_DEBUG("Teststub: Value received from DHT: %s\n", dht_response2); @@ -229,7 +224,6 @@ ret = opendht_get(s, (unsigned char *) val_bogus, (unsigned char *) host_addr, port); ret = opendht_read_response(s, dht_response2); - // if (ret == -1) exit (1); HIP_DEBUG("Get packet (bogus, will not be found (hopefully)) sent and ...\n"); HIP_DEBUG("Teststub: Value received from DHT: %s\n", dht_response2); close(s); @@ -268,7 +262,6 @@ ret = opendht_get(s, (unsigned char *) val_host_test, (unsigned char *) host_addr, port); ret = opendht_read_response(s, dht_response2); - // if (ret == -1) exit (1); HIP_DEBUG("Get packet sent and (value should be found, just sent it)...\n"); HIP_DEBUG("Value received from DHT: %s\n", dht_response2); close(s); @@ -304,7 +297,6 @@ ret = opendht_get(s, (unsigned char *) val_host_test, (unsigned char *) host_addr, port); ret = opendht_read_response(s, dht_response2); - // if (ret == -1) exit (1); HIP_DEBUG("Get packet (was removed, will not be found (hopefully)) sent and ...\n"); HIP_DEBUG("Teststub: Value received from DHT: %s\n", dht_response2); close(s);