Skip to content

Commit 95c4049

Browse files
committed
Support Firefox 46-47 intermediate standard in Python lib as well
1 parent b057976 commit 95c4049

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

python/http_ece/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ def lengthPrefix(key):
6767
keyinfo = buildInfo(b"aesgcm", context)
6868
nonceinfo = buildInfo(b"nonce", context)
6969
elif padSize == 1:
70-
keyinfo = b"Content-Encoding: aesgcm128"
71-
nonceinfo = b"Content-Encoding: nonce"
70+
if authSecret is not None:
71+
keyinfo = buildInfo(b"aesgcm128", context)
72+
nonceinfo = buildInfo(b"nonce", context)
73+
else:
74+
keyinfo = b"Content-Encoding: aesgcm128"
75+
nonceinfo = b"Content-Encoding: nonce"
7276
else:
7377
raise Exception(u"unable to set context for padSize=" + str(padSize))
7478

0 commit comments

Comments
 (0)