docs: def secure(self, fromAddress, toAddress,
                 fromCertificate, foreignCertificateAuthority=None,
                 authorize=True):
          """
          Return a Deferred which fires True when this connection has been
          secured as a channel between fromAddress (locally) and
          toAddress (remotely).
          Raises an error if this is not possible.
          """
          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)