Communication apparatus, method of controlling communication apparatus, and non-transitory computer-readable storage medium
A communication apparatus receives a communication parameter for wireless communication with a first communication apparatus via a wireless network from a second communication apparatus, generates encryption key information to be shared with the first communication apparatus based on the received communication parameter, acquires an expiration date for connection to the wireless network from the received communication parameter, connects to the first communication apparatus via the wireless network using the generated encryption key information, and determines whether the acquired expiration date has passed and restricts connection to the first communication apparatus using the encryption key information in a case where the expiration date has passed.
1. A communication apparatus comprising:
one or more processors; and
one or more memories which store instructions executable by the one or more processors to cause the communication apparatus to perform at least operations comprising:
receiving a communication parameter for wireless communication from a first communication apparatus;
generating encryption key information to be shared with a second communication apparatus based on the received communication parameter;
acquiring an expiration date for the received communication parameter;
setting the acquired expiration date for the received communication parameter as an expiration date for performing communication connection with the second communication apparatus using the generated encryption key information;
connecting to the second communication apparatus using the generated encryption key information; and
controlling to restrict connection to the second communication apparatus using the encryption key information in a case where the set expiration date for performing communication connection with the second communication apparatus has passed.
2. The communication apparatus according to claim 1 , the operations further comprising storing the generated encryption key information in association with the acquired expiration date, and
controlling to determines whether the set expiration date for performing communication connection with the second communication apparatus has passed by referring to the stored expiration date.
3. The communication apparatus according to claim 1 , the operations further comprising, at the time of connecting to the second communication apparatus, generateing an encryption key from the encryption key information, the encryption key information generated in advance, and the encryption key encrypting the wireless communication with the second communication apparatus.
4. The communication apparatus according to claim 1 , the operations further comprising, at the time of connecting to the second communication apparatus, determining whether the expiration date for performing communication connection with the second communication apparatus has passed, and in a case where the expiration date has passed, controlling to not connect to the second communication apparatus.
5. The communication apparatus according to claim 1 , wherein whether the expiration date for performing communication connection with the second communication apparatus has passed is determined periodically, and in a case where the expiration date has passed, the communication apparatus performs control to disconnect the wireless communication with the second communication apparatus.
6. The communication apparatus according to claim 1 , the operations further comprising, in a case where the expiration date for performing communication connection with the second communication apparatus has passed, controlling a display apparatus to display a notification that the expiration date for connection has passed, and restricting input to prevent the wireless network from being selected as a connection destination.
7. The communication apparatus according to claim 1 , the operations further comprising, in a case where the expiration date for performing communication connection with the second communication apparatus has passed, controlling a display apparatus to not display an expired wireless network.
8. The communication apparatus according to claim 1 , wherein the encryption key information is a pairwise master key (PMK) based on Institute of Electrical and Electronics Engineers (IEEE) 802.11 standards.
9. The communication apparatus according to claim 1 , wherein the communication parameter is set from the second communication apparatus to the communication apparatus using Device Provisioning Protocol (DPP).
10. The communication apparatus according to claim 1 , the operations further comprising, in a case where the communication apparatus operates as an access point (AP) based on the IEEE 802.11 standards, controlling to restrict the connection to the second communication apparatus so that the wireless communication with all second communication apparatuses connected to the communication apparatus is disconnected and a function of the access point is stopped.
11. The communication apparatus according to claim 1 , the operations further comprising, in a case where the communication apparatus operates as a station (STA) based on the IEEE 802.11 standards, controlling a display apparatus to display a notification that the expiration date for connection to the wireless network has passed.
12. The communication apparatus according to claim 1 , wherein the first communication apparatus is an enrollee in Device Provisioning Protocol (DPP), and the first communication apparatus is a configurator in DPP.
13. The communication apparatus according to claim 1 , wherein the encryption key information is not generated in a case where the expiration date for the communication parameter is acquired from the communication parameter and the expiration date for the communication parameter has passed.
14. The communication apparatus according to claim 1 , wherein an expiration date for performing the communication connection is set in a case where the communication parameter is a communication parameter received using DPP.
15. A method of controlling a communication apparatus, the method comprising:
receiving a communication parameter for wireless communication from a first communication apparatus;
generating encryption key information to be shared with a second communication apparatus based on the received communication parameter;
acquiring an expiration date for the received communication parameter;
setting the acquired expiration date for the communication parameter as an expiration date for performing communication connection with the second communication apparatus using the generated encryption key information;
connecting to the second communication apparatus using the generated encryption key information; and
restricting connection to the second communication apparatus using the encryption key information in a case where the set expiration date has passed.
16. The method according to claim 15 , wherein the encryption key information is not generated in a case where the expiration date for the communication parameter is acquired from the communication parameter and the expiration date for the communication parameter has passed.
17. The method according to claim 15 , wherein an expiration date for performing the communication connection is set in a case where the communication parameter is a communication parameter received using DPP.
18. A non-transitory computer-readable storage medium storing a computer program for causing a computer to execute a method of controlling a communication apparatus, the method comprising:
receiving a communication parameter for wireless communication from a first communication apparatus;
generating encryption key information to be shared with a second communication apparatus based on the received communication parameter;
acquiring an expiration date for the received communication parameter;
setting the acquired expiration date for the communication parameter as an expiration date for performing communication connection with the second communication apparatus using the generated encryption key information;
connecting to the second communication apparatus using the generated encryption key information; and
restricting connection to the second communication apparatus using the encryption key information in a case where the set expiration date has passed.
19. The non-transitory computer-readable storage medium according to claim 18 , wherein the encryption key information is not generated in a case where the expiration date for the communication parameter is acquired from the communication parameter and the expiration date for the communication parameter has passed.
20. The non-transitory computer-readable storage medium according to claim 18 , wherein an expiration date for performing the communication connection is set in a case where the communication parameter is a communication parameter received using DPP.