def secure(self, fromAddress, toAddress,
               fromCertificate, foreignCertificateAuthority=None,
               authorize=True):
        if self.hostCertificate is not None:
            raise RuntimeError("Re-securing already secured connection.")

        def _cbSecure(response):
            if foreignCertificateAuthority is not None:
                self.authorized = True
            return True
        extra = {'tls_localCertificate': fromCertificate}
        if foreignCertificateAuthority is not None:
            extra['tls_verifyAuthorities'] = [foreignCertificateAuthority]

        return self.callRemote(
            Secure,
            From=fromAddress,
            to=toAddress,
            authorize=authorize, **extra).addCallback(_cbSecure)
Clones the contents of this object into a new instance of the same
dataset/ETHPy150Open twisted/vertex/vertex/q2q.py/Q2Q.secure--crossover with--dataset/ETHPy150Open enthought/traits/traits/trait_handlers.py/TraitType.clone