vpnengine/pkiservice/src/pkimapper.cpp
branchRCL_3
changeset 49 5960d2d03390
parent 44 735de8341ce4
equal deleted inserted replaced
46:29c8f9bc68e1 49:5960d2d03390
   430         // (issuer/subject name can be invalid)
   430         // (issuer/subject name can be invalid)
   431         CMapDescriptor* mapping = (*iMapping)[i];
   431         CMapDescriptor* mapping = (*iMapping)[i];
   432         if(mapping->IsMatchingL(aDescriptor, aInfoOnly, aStoreType))
   432         if(mapping->IsMatchingL(aDescriptor, aInfoOnly, aStoreType))
   433             {
   433             {
   434             // If we found a match, process it further
   434             // If we found a match, process it further
   435             _LIT(KJavaTrustRootLabel, "Java Trust Root");
   435             _LIT(KMidp2Label, "MIDP2");
   436             // Discard all "Java Trust Root" certificates to avoid label-mapping problem
   436             TBuf<12> buf;
   437             if (mapping->Label().Compare(KJavaTrustRootLabel) != 0)
   437             buf.Append(KMidp2Label);
       
   438             // Discard all MIDP2 certificates to avoid label-mapping problem
       
   439             if (buf.Compare(mapping->Label()) != 0)
   438                 {
   440                 {
   439                 if(mapping->EndTime() > furthestEndTime)
   441                 if(mapping->EndTime() > furthestEndTime)
   440                     {
   442                     {
   441                     furthestEndTime = mapping->EndTime();
   443                     furthestEndTime = mapping->EndTime();
   442                     foundIndex = i;
   444                     foundIndex = i;
   444                     // Continue to search the longest lasting certificate
   446                     // Continue to search the longest lasting certificate
   445                     }
   447                     }
   446                 }
   448                 }
   447             else 
   449             else 
   448                 {
   450                 {
   449                 LOG(Log::Printf(_L("Found a cert, but it was a \"Java Trust Root\" one - continuing search")));
   451                 LOG(Log::Printf(_L("Found a cert, but it was a MIDP2 one - continuing search")));
   450                 }
   452                 }
   451             }
   453             }
   452         }
   454         }
   453     
   455     
   454     if(foundIndex == -1)
   456     if(foundIndex == -1)