An information processing apparatus, comprising: a registering unit configured to register pieces of policy information in a storage unit in accordance with an order of priority, the pieces of policy information each including at least an address of an apparatus of a communication partner and key information used for communication with the apparatus of the communication partner; and a selecting unit configured to select from the storage unit any policy information to be used for the communication with the apparatus of the communication partner in accordance with the address of the apparatus of the communication partner and the order of priority of the pieces of policy information, characterized by comprising: a control unit configured to perform control, in which, in a case where an address of an apparatus of a communication partner of policy information to be registered by the registering unit overlaps an address of an apparatus of a communication partner of policy information already registered in the storage unit, the control is performed so that key information of the policy information to be registered by the registering unit is the same as key information of the policy information including the address with which the address of the apparatus of the communication partner of the policy information to be registered overlaps, among pieces of policy information already registered in the storage unit, wherein the address of the apparatus of the communication partner of the policy information to be registered by the registering unit includes a plurality of addresses, and the address of the apparatus of the communication partner of the policy information already registered in the storage unit includes a plurality of addresses. a registering unit configured to register pieces of policy information in a storage unit in accordance with an order of priority, the pieces of policy information each including at least an address of an apparatus of a communication partner and key information used for communication with the apparatus of the communication partner; and a selecting unit configured to select from the storage unit any policy information to be used for the communication with the apparatus of the communication partner in accordance with the address of the apparatus of the communication partner and the order of priority of the pieces of policy information, characterized by comprising: a control unit configured to perform control, in which, in a case where an address of an apparatus of a communication partner of policy information to be registered by the registering unit overlaps an address of an apparatus of a communication partner of policy information already registered in the storage unit, the control is performed so that key information of the policy information to be registered by the registering unit is the same as key information of the policy information including the address with which the address of the apparatus of the communication partner of the policy information to be registered overlaps, among pieces of policy information already registered in the storage unit, wherein the address of the apparatus of the communication partner of the policy information to be registered by the registering unit includes a plurality of addresses, and the address of the apparatus of the communication partner of the policy information already registered in the storage unit includes a plurality of addresses. a control unit configured to perform control, in which, in a case where an address of an apparatus of a communication partner of policy information to be registered by the registering unit overlaps an address of an apparatus of a communication partner of policy information already registered in the storage unit, the control is performed so that key information of the policy information to be registered by the registering unit is the same as key information of the policy information including the address with which the address of the apparatus of the communication partner of the policy information to be registered overlaps, among pieces of policy information already registered in the storage unit, wherein the address of the apparatus of the communication partner of the policy information to be registered by the registering unit includes a plurality of addresses, and the address of the apparatus of the communication partner of the policy information already registered in the storage unit includes a plurality of addresses.