'L{trustRootFromCertificates} called with certificate A will cause
L{optionsForClientTLS} to accept client connections to a server with
certificate B where B is signed by A.'

def test_trustRootCertificateAuthorityTrustsConnection(self):

    (caCert, serverCert) = certificatesForAuthorityAndServer()
    trust = sslverify.trustRootFromCertificates([caCert])
    (sProto, cProto, pump) = loopbackTLSConnectionInMemory(trustRoot=trust, privateKey=serverCert.privateKey.original, serverCertificate=serverCert.original)
    self.assertEqual(cProto.wrappedProtocol.data, 'greetings!')
    self.assertIsNone(cProto.wrappedProtocol.lostReason)
