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
This commit is contained in:
@@ -291,7 +291,7 @@ def is_asn1_token(token):
|
|||||||
Checking for just M is insufficient
|
Checking for just M is insufficient
|
||||||
|
|
||||||
But we will only check for MII:
|
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
|
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
|
therefore, we will check for MII only and ignore the case of larger tokens
|
||||||
|
|||||||
Reference in New Issue
Block a user