Remove private keys 03/216203/2
authorJihoon Jung <jh8801.jung@samsung.com>
Tue, 22 Oct 2019 16:39:49 +0000 (01:39 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Tue, 22 Oct 2019 16:54:34 +0000 (01:54 +0900)
Change-Id: Id851381882a28805ffc153dece6fae9371f14431
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
tool/wifi_mgr_public_dpp.c

index 820ac2422c1bfad20b986be3c8f4c1c94cfd7359..04598b7e247bacb01adc1c8904a3f75029d99602 100644 (file)
 #include "wifi_mgr_menu.h"
 #include "wifi_mgr_public_dpp.h"
 
-
-#define WIFI_DPP_ENROLLEE_RESPONDER_AUTH_KEY "30770201010420965343A2843698032E2035BE5FEAC74249EBA2AC368467634B15D55E103C20CEA00A06082A8648CE3D030107A14403420004018EF2B0C34B9065D27E74DD4E34F1911CB20D1C3FC4A443A3C642D78389A91EAF3F9B3975BFFE53AC03EBA12752B2BBC7C8F771ECE124AD1A4E185F722F22A9"
-#define WIFI_DPP_CONFIGURATOR_KEY "3077020101042041FBDC3730C1359E9CA33624BD8386FA15657EDE3345FC467F66031CA1238385A00A06082A8648CE3D030107A14403420004147A92156330B9FD2BC8997D4F02DFA38E72323BCE85468DEB2569D60247B4CE793C00A2FE90960D9E18E084712C0D900A1F3F499E616EEF5FFF56A0F416F54B"
-#define WIFI_DPP_CONFIGURATOR_RESPONDER_AUTH_KEY "30770201010420FECD32BF73910579485CCF4E478149F691886B03BC8840B275F50814ACBF8BE6A00A06082A8648CE3D030107A144034200045C8242DEED3E60F9C8AC44A3A672F6302097C0853BD24C4A3093B5BFB2108CD1343963308D10A6021602FB3F5B4BCE8E778FAA23F53A30B667745DF16E0A1991"
-
 /* DPP Configurator SSID */
 static char g_ssid[MENU_DATA_SIZE] = "DPP-Network";
 
@@ -42,21 +37,27 @@ static char g_net_role[MENU_DATA_SIZE] = "1";
 static char g_akm[MENU_DATA_SIZE] = "0";
 
 /* DPP Configurator AKM PSK key*/
-static char g_psk_key[MENU_DATA_SIZE] = "wpapassword";
+static char g_psk_key[MENU_DATA_SIZE] = "";
 
 /* DPP Configurator AKM SAE key */
-static char g_sae_key[MENU_DATA_SIZE] = "saepassword";
+static char g_sae_key[MENU_DATA_SIZE] = "";
 
 /* DPP Enrollee Peer URI */
-static char g_enrollee_peer_uri[MENU_DATA_SIZE] = "DPP:C:81/6;M:f8:d1:11:62:c7:28;K:MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgADAY7ysMNLkGXSfnTdTjTxkRyyDRw/xKRDo8ZC14OJqR4=;;";
+static char g_enrollee_peer_uri[MENU_DATA_SIZE] = "";
 
 /* DPP Configurator Peer URI */
-static char g_configurator_peer_uri[MENU_DATA_SIZE] = "DPP:C:81/6;M:f8:d1:11:62:ba:d4;K:MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgADXIJC3u0+YPnIrESjpnL2MCCXwIU70kxKMJO1v7IQjNE=;;";
+static char g_configurator_peer_uri[MENU_DATA_SIZE] = "";
 
 static char g_pending_peer_uri[MENU_DATA_SIZE] = "Not yet determined";
 
 static char g_pending_auth_key[MENU_DATA_SIZE] = "Not yet determined";
 
+static char g_enrollee_responder_auth_key[MENU_DATA_SIZE] = "";
+
+static char g_configurator_key[MENU_DATA_SIZE] = "";
+
+static char g_configurator_responder_auth_key[MENU_DATA_SIZE] = "";
+
 extern wifi_manager_h g_wifi_h;
 
 static wifi_manager_dpp_h g_wifi_dpp_h = NULL;
@@ -314,7 +315,7 @@ static int _test_public_dpp_start_configurator_initiator(MManager *mm, struct me
 
        msg(HR_SINGLE);
 
-       ret = wifi_manager_dpp_start(g_wifi_dpp_h, NULL, WIFI_DPP_CONFIGURATOR_KEY, __get_akm_key(akm));
+       ret = wifi_manager_dpp_start(g_wifi_dpp_h, NULL, g_configurator_key, __get_akm_key(akm));
        if (ret == WIFI_MANAGER_ERROR_NONE) {
                msg("Succeeded to start DPP Configurator initiator " LOG_CYAN LOG_END);
        } else {
@@ -405,8 +406,8 @@ static int _test_public_dpp_start_configurator_responder(MManager *mm, struct me
        msg(HR_SINGLE);
 
        ret = wifi_manager_dpp_start(g_wifi_dpp_h,
-                       WIFI_DPP_CONFIGURATOR_RESPONDER_AUTH_KEY,
-                       WIFI_DPP_CONFIGURATOR_KEY,
+                       g_configurator_responder_auth_key,
+                       g_configurator_key,
                        __get_akm_key(akm));
        if (ret == WIFI_MANAGER_ERROR_NONE) {
                msg("Succeeded to start DPP Configurator responder " LOG_CYAN LOG_END);
@@ -521,7 +522,7 @@ static int _test_public_dpp_start_enrollee_responder(MManager *mm, struct menu_d
        msg(HR_SINGLE);
 
        ret = wifi_manager_dpp_start(g_wifi_dpp_h,
-                       WIFI_DPP_ENROLLEE_RESPONDER_AUTH_KEY, NULL, NULL);
+                       g_enrollee_responder_auth_key, NULL, NULL);
        if (ret == WIFI_MANAGER_ERROR_NONE) {
                msg("Succeeded to start DPP Enrollee responder " LOG_CYAN LOG_END);
        } else {
@@ -641,6 +642,9 @@ struct menu_data menu_public_dpp[] = {
        { "6", LOG_LIGHTGREEN "[Configurator Peer URI]" LOG_END, NULL, NULL, g_configurator_peer_uri},
        { "7", LOG_LIGHTGREEN "[Pending Peer URI]" LOG_END, NULL, NULL, g_pending_peer_uri},
        { "8", LOG_LIGHTGREEN "[Pending Auth Key]" LOG_END, NULL, NULL, g_pending_auth_key},
+       { "9", LOG_LIGHTGREEN "[Enrollee Responder Auth Key]" LOG_END, NULL, NULL, g_enrollee_responder_auth_key},
+       { "10", LOG_LIGHTGREEN "[Configurator Key]" LOG_END, NULL, NULL, g_configurator_key},
+       { "11", LOG_LIGHTGREEN "[Configurator Responder Auth Key]" LOG_END, NULL, NULL, g_configurator_responder_auth_key},
        { "p", "[Enter] peer URI" LOG_END, NULL, _test_public_dpp_enter_peer_uri, NULL},
        { "o", "[GENERATE] own URI" LOG_END, NULL, _test_dpp_generate_own_uri, NULL},
        { "s", LOG_LIGHTBLUE "[Start]" LOG_END, menu_public_dpp_start, NULL, NULL},