A wireless-communication device (200, 210, 220, 230) performing mutual authentication between the wireless-communication device (200, 210, 220, 230) and a different wireless-communication device (200, 210, 220, 230) by using an authentication server, the wireless-communication device (200, 210, 220, 230) comprising: communication-setting-data-retention means configured to retain communication-setting data including a first metric corresponding to the path from the wireless-communication device (200, 210, 220, 230) to the authentication server, as a self-authentication-server metric; and signal-reception means configured to receive a predetermined signal transmitted from the different wireless-communication device (200, 210, 220, 230), the predetermined signal including a second metric corresponding to the path from the different wireless-communication device (200, 210, 220, 230) to the authentication server, as a nonself-authentication-server metric; the wireless-communication device being characterized in comprising: control means configured to make a first setting so that the wireless-communication device (200, 210, 220, 230) operates, as a supplicant, during the mutual authentication when the self-authentication-server metric is worse than the nonself-authentication-server metric, and make a second setting so that the wireless-communication device (200, 210, 220, 230) operates, as an authenticator, during the mutual authentication when the self-authentication-server metric is better than the nonself-authentication-server metric, wherein the first metric and/or the second metric shows wireless-communication quality of a wireless-communication path leading to the authentication server. communication-setting-data-retention means configured to retain communication-setting data including a first metric corresponding to the path from the wireless-communication device (200, 210, 220, 230) to the authentication server, as a self-authentication-server metric; and signal-reception means configured to receive a predetermined signal transmitted from the different wireless-communication device (200, 210, 220, 230), the predetermined signal including a second metric corresponding to the path from the different wireless-communication device (200, 210, 220, 230) to the authentication server, as a nonself-authentication-server metric; the wireless-communication device being characterized in comprising: control means configured to make a first setting so that the wireless-communication device (200, 210, 220, 230) operates, as a supplicant, during the mutual authentication when the self-authentication-server metric is worse than the nonself-authentication-server metric, and make a second setting so that the wireless-communication device (200, 210, 220, 230) operates, as an authenticator, during the mutual authentication when the self-authentication-server metric is better than the nonself-authentication-server metric, wherein the first metric and/or the second metric shows wireless-communication quality of a wireless-communication path leading to the authentication server. control means configured to make a first setting so that the wireless-communication device (200, 210, 220, 230) operates, as a supplicant, during the mutual authentication when the self-authentication-server metric is worse than the nonself-authentication-server metric, and make a second setting so that the wireless-communication device (200, 210, 220, 230) operates, as an authenticator, during the mutual authentication when the self-authentication-server metric is better than the nonself-authentication-server metric, wherein the first metric and/or the second metric shows wireless-communication quality of a wireless-communication path leading to the authentication server.