diff options
author | Kevin Turner <kevin@janrain.com> | 2006-08-28 19:52:54 +0000 |
---|---|---|
committer | Kevin Turner <kevin@janrain.com> | 2006-08-28 19:52:54 +0000 |
commit | a3283dd86e92adf30c170e41f0fc809a0780898c (patch) | |
tree | 104238c7e112168eef4360c03719bd0e7aa1ba78 /openid/association.py | |
parent | a7f72e34a8ba996bf4a543f33c599cc162a906b0 (diff) | |
download | openid-a3283dd86e92adf30c170e41f0fc809a0780898c.tar.gz |
[project @ association: HMAC-SHA256 is HMAC-SHA256-SIGNALL]
Diffstat (limited to 'openid/association.py')
-rw-r--r-- | openid/association.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/openid/association.py b/openid/association.py index 8955878..86841d6 100644 --- a/openid/association.py +++ b/openid/association.py @@ -10,20 +10,20 @@ from openid import kvform from openid import oidutil from openid.message import OPENID_NS -all_association_types = ['HMAC-SHA1', 'HMAC-SHA256'] +all_association_types = ['HMAC-SHA1', 'HMAC-SHA256-SIGNALL'] if hasattr(cryptutil, 'hmacSha256'): supported_association_types = list(all_association_types) default_association_order = [ ('HMAC-SHA1', 'DH-SHA1'), - ('HMAC-SHA256', 'DH-SHA256'), + ('HMAC-SHA256-SIGNALL', 'DH-SHA256'), ('HMAC-SHA1', 'no-encryption'), - ('HMAC-SHA256', 'no-encryption'), + ('HMAC-SHA256-SIGNALL', 'no-encryption'), ] only_encrypted_association_order = [ ('HMAC-SHA1', 'DH-SHA1'), - ('HMAC-SHA256', 'DH-SHA256'), + ('HMAC-SHA256-SIGNALL', 'DH-SHA256'), ] else: supported_association_types = ['HMAC-SHA1'] @@ -41,7 +41,7 @@ def getSessionTypes(assoc_type): """Return the allowed session types for a given association type""" if assoc_type == 'HMAC-SHA1': return ['DH-SHA1', 'no-encryption'] - elif assoc_type == 'HMAC-SHA256': + elif assoc_type == 'HMAC-SHA256-SIGNALL': return ['DH-SHA256', 'no-encryption'] else: return [] @@ -106,7 +106,7 @@ encrypted_negotiator = SessionNegotiator(only_encrypted_association_order) def getSecretSize(assoc_type): if assoc_type == 'HMAC-SHA1': return 20 - elif assoc_type == 'HMAC-SHA256': + elif assoc_type == 'HMAC-SHA256-SIGNALL': return 32 else: raise ValueError('Unsupported association type: %r' % (assoc_type,)) @@ -387,7 +387,7 @@ class Association(object): kv = kvform.seqToKV(pairs) if self.assoc_type == 'HMAC-SHA1': mac = cryptutil.hmacSha1 - elif self.assoc_type == 'HMAC-SHA256': + elif self.assoc_type == 'HMAC-SHA256-SIGNALL': mac = cryptutil.hmacSha256 else: raise ValueError( |