summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgit <git>2014-10-06 22:01:54 +0000
committergit <git>2014-10-06 22:01:54 +0000
commit5018d4e478a69564bdbe9e43179f90accc5d1bf9 (patch)
tree359b27470609509235b4cc39a8e81d9240cb9107
parent1ffaa987838beb440f0d09c1e3ea6ebb55a524e3 (diff)
downloadopentracker-5018d4e478a69564bdbe9e43179f90accc5d1bf9.tar.gz
opentracker-5018d4e478a69564bdbe9e43179f90accc5d1bf9.zip
Initialise all values of aes key
-rw-r--r--ot_udp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ot_udp.c b/ot_udp.c
index 7c688d1..dfdbb10 100644
--- a/ot_udp.c
+++ b/ot_udp.c
@@ -26,9 +26,12 @@ static uint32_t g_key_of_the_hour[2] = {0};
static ot_time g_hour_of_the_key;
static void udp_generate_rijndael_round_key() {
- uint8_t key[16];
- key[0] = random(); key[1] = random(); key[2] = random(); key[3] = random();
- rijndaelKeySetupEnc128( g_rijndael_round_key, key );
+ uint32_t key[16];
+ key[0] = random();
+ key[1] = random();
+ key[2] = random();
+ key[3] = random();
+ rijndaelKeySetupEnc128( g_rijndael_round_key, (uint8_t*)key );
g_key_of_the_hour[0] = random();
g_hour_of_the_key = g_now_minutes;
@@ -200,4 +203,4 @@ void udp_init( int64 sock, unsigned int worker_count ) {
pthread_create( &thread_id, NULL, udp_worker, (void *)sock );
}
-const char *g_version_udp_c = "$Source: /home/cvsroot/opentracker/ot_udp.c,v $: $Revision: 1.30 $\n";
+const char *g_version_udp_c = "$Source: /home/cvsroot/opentracker/ot_udp.c,v $: $Revision: 1.31 $\n";