예제 #1
0
    def _challenge(self, node):
        encryption = Encryption(self.number, self.secret, node.data)
        self.writer.encrypt = encryption.encrypt
        self.reader.decrypt = encryption.decrypt

        logger.debug("Session Key: %s", encryption.export_key())

        response = Node("response", xmlns="urn:ietf:params:xml:ns:xmpp-sasl",
                        data=encryption.get_response())
        self._write(response, encrypt=False)
        self._incoming()
예제 #2
0
    def _challenge(self, node):
        encryption = Encryption(self.number, self.secret, node.data)
        self.writer.encrypt = encryption.encrypt
        self.reader.decrypt = encryption.decrypt

        logger.debug("Session Key: %s", encryption.export_key())

        response = Node("response",
                        xmlns="urn:ietf:params:xml:ns:xmpp-sasl",
                        data=encryption.get_response())
        self._write(response, encrypt=False)
        self._incoming()
예제 #3
0
    def _challenge(self, node):
        encryption = Encryption(self.secret, node.data)
        logger.debug("Session Keys: %s",
                     [key.encode("hex") for key in encryption.keys])

        self.writer.encrypt = encryption.encrypt
        self.reader.decrypt = encryption.decrypt

        data = "%s%s%s" % (self.number, node.data, utils.timestamp())
        response = Node("response", data=encryption.encrypt(data, False))

        self._write(response, encrypt=False)
        self._incoming()
예제 #4
0
    def _challenge(self, node):
        encryption = Encryption(self.secret, node.data)
        logger.debug(
            "Session Keys: %s", [key.encode("hex") for key in encryption.keys])

        self.writer.encrypt = encryption.encrypt
        self.reader.decrypt = encryption.decrypt

        data = "%s%s%s" % (self.number, node.data, utils.timestamp())
        response = Node("response", data=encryption.encrypt(data, False))

        self._write(response, encrypt=False)
        self._incoming()