'L{PublicKey.matches} returns L{True} for keys from certificates with
the same key, and L{False} for keys from certificates with different
keys.'

def test_publicKeyMatching(self):

    hostA = sslverify.Certificate.loadPEM(A_HOST_CERTIFICATE_PEM)
    hostB = sslverify.Certificate.loadPEM(A_HOST_CERTIFICATE_PEM)
    peerA = sslverify.Certificate.loadPEM(A_PEER_CERTIFICATE_PEM)
    self.assertTrue(hostA.getPublicKey().matches(hostB.getPublicKey()))
    self.assertFalse(peerA.getPublicKey().matches(hostA.getPublicKey()))
