summaryrefslogtreecommitdiff
path: root/keystoneclient/common
diff options
context:
space:
mode:
authorzhiyuan_cai <luckyvega.g@gmail.com>2015-01-04 15:57:08 +0800
committerzhiyuan_cai <luckyvega.g@gmail.com>2015-01-04 15:57:08 +0800
commit727f5e77e20f1f1db469810c4c78ae9aac50401c (patch)
tree2cd32a9a7e0bce1b4eef4614c9872aea40474ed2 /keystoneclient/common
parent53a82232ff52b9f39a3cb22d1769c3f9134e7003 (diff)
downloadpython-keystoneclient-727f5e77e20f1f1db469810c4c78ae9aac50401c.tar.gz
Fix a comment error in cms.py
The comment of function is_asn1_token says "Max length of the content using 2 octets is 7FFF or 32767", which should be 3FFF or 16383. Using Base64 string "MII" as the pki asn1 prefix, whose binary form is 0x3082+0b00, the two octets for content length will start with 0b00, so the max length is 0b0011+0xFFF(0x3FFF). Change-Id: I6c3cedc0243a60328e0e7bd45957616ad272f524
Diffstat (limited to 'keystoneclient/common')
-rw-r--r--keystoneclient/common/cms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystoneclient/common/cms.py b/keystoneclient/common/cms.py
index d49a0c5..d0c467e 100644
--- a/keystoneclient/common/cms.py
+++ b/keystoneclient/common/cms.py
@@ -291,7 +291,7 @@ def is_asn1_token(token):
Checking for just M is insufficient
But we will only check for MII:
- Max length of the content using 2 octets is 7FFF or 32767.
+ Max length of the content using 2 octets is 3FFF or 16383.
It's not practical to support a token of this length or greater in http
therefore, we will check for MII only and ignore the case of larger tokens