Remove limits on IVT public key lengths. (#24042)
authorJeremy Koritzinsky <jkoritzinsky@gmail.com>
Wed, 17 Apr 2019 03:13:29 +0000 (20:13 -0700)
committerJan Kotas <jkotas@microsoft.com>
Wed, 17 Apr 2019 03:13:29 +0000 (20:13 -0700)
src/binder/textualidentityparser.cpp

index 7cd4545..1e2711b 100644 (file)
@@ -61,9 +61,6 @@ namespace BINDER_SPACE
     {
         const int iPublicKeyTokenLength = 8;
 
-        const int iPublicKeyMinLength = 0;
-        const int iPublicKeyMaxLength = 2048;
-
         const int iVersionMax = 65535;
         const int iVersionParts = 4;
 
@@ -143,10 +140,7 @@ namespace BINDER_SPACE
 
         inline BOOL ValidatePublicKey(SString &publicKey)
         {
-            
-            return ((publicKey.GetCount() >= (iPublicKeyMinLength * 2)) &&
-                    (publicKey.GetCount() <= (iPublicKeyMaxLength * 2)) &&
-                    ValidateHex(publicKey));
+            return ValidateHex(publicKey);
         }
 
         const struct {