Commit 7ddcc342 authored by mathieui's avatar mathieui

Merge branch 'xep-0300-fixup' into 'master'

XEP-0300: small fixes

See merge request poezio/slixmpp!151
parents d77eb3a7 1cf6393b
# Slixmpp: The Slick XMPP Library
# Copyright (C) 2017 Emmanuel Gil Peyrot
# This file is part of Slixmpp.
......@@ -15,6 +14,9 @@ log = logging.getLogger(__name__)
class XEP_0300(BasePlugin):
"""
XEP-0300: Use of Cryptographic Hash Functions in XMPP
"""
name = 'xep_0300'
description = 'XEP-0300: Use of Cryptographic Hash Functions in XMPP'
......@@ -22,7 +24,7 @@ class XEP_0300(BasePlugin):
stanza = stanza
default_config = {
'block_size': 1024 * 1024, # One MiB
'preferded': 'sha-256',
'preferred': 'sha-256',
'enable_sha-1': False,
'enable_sha-256': True,
'enable_sha-512': True,
......@@ -61,7 +63,7 @@ class XEP_0300(BasePlugin):
def plugin_end(self):
for namespace in self.enabled_hashes:
self.xmpp['xep_0030'].del_feature(namespace)
self.xmpp['xep_0030'].del_feature(feature=namespace)
self.enabled_hashes.clear()
self.xmpp['xep_0030'].del_feature(feature=Hash.namespace)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment