vpnengine/pkiservice/src/pkimapper.cpp
branchRCL_3
changeset 22 9f4e37332ce5
parent 2 ef893827b4d1
child 23 473321461bba
equal deleted inserted replaced
20:352850cbed81 22:9f4e37332ce5
   443         // (issuer/subject name can be invalid)
   443         // (issuer/subject name can be invalid)
   444         CMapDescriptor* mapping = (*iMapping)[i];
   444         CMapDescriptor* mapping = (*iMapping)[i];
   445         if(mapping->IsMatchingL(aDescriptor, aInfoOnly, aStoreType))
   445         if(mapping->IsMatchingL(aDescriptor, aInfoOnly, aStoreType))
   446             {
   446             {
   447             // If we found a match, process it further
   447             // If we found a match, process it further
   448             _LIT(KMidp2Label, "MIDP2");
   448             _LIT(KJavaTrustRootLabel, "Java Trust Root");
   449             TBuf<12> buf;
   449             // Discard all "Java Trust Root" certificates to avoid label-mapping problem
   450             buf.Append(KMidp2Label);
   450             if (mapping->Label().Compare(KJavaTrustRootLabel) != 0)
   451             // Discard all MIDP2 certificates to avoid label-mapping problem
       
   452             if (buf.Compare(mapping->Label()) != 0)
       
   453                 {
   451                 {
   454                 if(mapping->EndTime() > furthestEndTime)
   452                 if(mapping->EndTime() > furthestEndTime)
   455                     {
   453                     {
   456                     furthestEndTime = mapping->EndTime();
   454                     furthestEndTime = mapping->EndTime();
   457                     foundIndex = i;
   455                     foundIndex = i;
   459                     // Continue to search the longest lasting certificate
   457                     // Continue to search the longest lasting certificate
   460                     }
   458                     }
   461                 }
   459                 }
   462             else 
   460             else 
   463                 {
   461                 {
   464                 LOG(Log::Printf(_L("Found a cert, but it was a MIDP2 one - continuing search")));
   462                 LOG(Log::Printf(_L("Found a cert, but it was a \"Java Trust Root\" one - continuing search")));
   465                 }
   463                 }
   466             }
   464             }
   467         }
   465         }
   468     
   466     
   469     if(foundIndex == -1)
   467     if(foundIndex == -1)