#include <tr_dh.h>
-char tmp_key1[32] =
- {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
- 0x19, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
-
-char tmp_key2[32] =
- {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04};
-
-int tmp_len = 32;
+// char tmp_key1[32] =
+// {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+// 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+// 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+// 0x19, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
+//
+// char tmp_key2[32] =
+// {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+// 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
+// 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
+// 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04};
+//
+// int tmp_len = 32;
int main (int argc,
const char *argv[])
/* TBD -- Generate random private keys */
/* Generate initial DH params on the client side */
- if (NULL == (c_dh = tr_create_dh_params(tmp_key1, tmp_len))) {
+ if (NULL == (c_dh = tr_create_dh_params(NULL, 0))) {
printf("Error: Can't create client DH params, exiting.\n");
exit(1);
}
/*** Would now send DH params and client's public key to the server ***/
/* Generate DH params on the server side */
- if (NULL == (s_dh = tr_create_matching_dh(tmp_key2, tmp_len, c_dh))) {
+ if (NULL == (s_dh = tr_create_matching_dh(NULL, 0, c_dh))) {
printf("Error: Can't create server server DH params, exiting.\n");
exit(1);
}