Changeset 9064
- Timestamp:
- 11/28/07 20:26:40 (12 months ago)
- Location:
- trunk/src
- Files:
-
- 2 modified
-
common/stanza_session.py (modified) (2 diffs)
-
gajim.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common/stanza_session.py
r8873 r9064 585 585 586 586 feature.addChild(node=x) 587 587 588 588 if not_acceptable: 589 589 response = xmpp.Error(response, xmpp.ERR_NOT_ACCEPTABLE) … … 854 854 def acknowledge_termination(self): 855 855 StanzaSession.acknowledge_termination(self) 856 856 857 857 self.enable_encryption = False 858 858 859 def fail_bad_negotiation(self, reason): 860 '''they've tried to feed us a bogus value, send an error and cancel everything.''' 859 def fail_bad_negotiation(self, reason, fields = None): 860 '''sends an error and cancels everything. 861 862 if fields == None, the remote party has given us a bad cryptographic value of some kind 863 864 otherwise, list the fields we haven't implemented''' 861 865 862 866 err = xmpp.Error(xmpp.Message(), xmpp.ERR_FEATURE_NOT_IMPLEMENTED) 863 867 err.T.error.T.text.setData(reason) 868 869 if fields: 870 feature = xmpp.Node(xmpp.NS_FEATURE + ' feature') 871 872 for field in fields: 873 fn = xmpp.Node('field') 874 fn['var'] = field 875 feature.addChild(node=feature) 876 877 err.addChild(node=feature) 878 864 879 self.send(err) 865 880 -
trunk/src/gajim.py
r9053 r9064 1899 1899 # we don't support 3-message negotiation as the responder 1900 1900 if 'dhkeys' in form.asDict(): 1901 err = xmpp.Error(xmpp.Message(), xmpp.ERR_FEATURE_NOT_IMPLEMENTED) 1902 1903 feature = xmpp.Node(xmpp.NS_FEATURE + ' feature') 1904 field = xmpp.Node('field') 1905 field['var'] = 'dhkeys' 1906 1907 feature.addChild(node=field) 1908 err.addChild(node=feature) 1909 1910 session.send(err) 1901 session.fail_bad_negotiation('3 message negotiation not supported when responding', ('dhkeys',)) 1911 1902 return 1912 1903
