A method for use in a peer-to-peer communication system to ensure valid
connections are made in a secure manner includes the steps of receiving
an address record for a peer node which includes an ID certificate. The
ID certificate is validated and checked to verify that the ID certificate
has not expired. Further, the method determines if the node from whom the
address record was received is to be trusted, and the number of instances
of the IP address included in the certificate is already stored in cache.
When the foregoing are completed successfully, i.e. the certificate is
valid, not expired, has been supplied by a trusted neighbor, and does not
point to an IP address that already exists for different ID's multiple
times, the method opportunistically verifies ownership of the ID
certificate at the peer node's IP address. That is, the verification of
ownership only occurs when the advertiser of the ID is the owner of that
ID (or when the ID is to be used). If any of the above cannot be
completed successfully, the address record is discarded.