vpnengine/pkiservice/src/pkimapper.cpp
branchRCL_3
changeset 23 473321461bba
parent 22 9f4e37332ce5
child 24 e06095241a65
equal deleted inserted replaced
22:9f4e37332ce5 23:473321461bba
   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(KJavaTrustRootLabel, "Java Trust Root");
   448             _LIT(KMidp2Label, "MIDP2");
   449             // Discard all "Java Trust Root" certificates to avoid label-mapping problem
   449             TBuf<12> buf;
   450             if (mapping->Label().Compare(KJavaTrustRootLabel) != 0)
   450             buf.Append(KMidp2Label);
       
   451             // Discard all MIDP2 certificates to avoid label-mapping problem
       
   452             if (buf.Compare(mapping->Label()) != 0)
   451                 {
   453                 {
   452                 if(mapping->EndTime() > furthestEndTime)
   454                 if(mapping->EndTime() > furthestEndTime)
   453                     {
   455                     {
   454                     furthestEndTime = mapping->EndTime();
   456                     furthestEndTime = mapping->EndTime();
   455                     foundIndex = i;
   457                     foundIndex = i;
   457                     // Continue to search the longest lasting certificate
   459                     // Continue to search the longest lasting certificate
   458                     }
   460                     }
   459                 }
   461                 }
   460             else 
   462             else 
   461                 {
   463                 {
   462                 LOG(Log::Printf(_L("Found a cert, but it was a \"Java Trust Root\" one - continuing search")));
   464                 LOG(Log::Printf(_L("Found a cert, but it was a MIDP2 one - continuing search")));
   463                 }
   465                 }
   464             }
   466             }
   465         }
   467         }
   466     
   468     
   467     if(foundIndex == -1)
   469     if(foundIndex == -1)