cryptoservices/filebasedcertificateandkeystores/source/certstore/server/filecertstore.cpp
equal
deleted
inserted
replaced
324 User::LeaveIfError(index); |
324 User::LeaveIfError(index); |
325 |
325 |
326 // API policing |
326 // API policing |
327 const CCertStoreEntry& entry = iEntryList->GetByIndex(index); |
327 const CCertStoreEntry& entry = iEntryList->GetByIndex(index); |
328 |
328 |
329 if (!AddRemovePolicy(entry.CertInfo().CertificateOwnerType()).CheckPolicy(aMessage)) |
329 |
|
330 //Check whether the certificate is deleteable and that the necessary capabilities are |
|
331 //present |
|
332 if (!AddRemovePolicy(entry.CertInfo().CertificateOwnerType()).CheckPolicy(aMessage) || |
|
333 !entry.CertInfo().IsDeletable()) |
330 { |
334 { |
331 User::Leave(KErrPermissionDenied); |
335 User::Leave(KErrPermissionDenied); |
332 } |
336 } |
333 |
337 |
334 TCleanupItem cleanupStore(RevertStore, iStore); |
338 TCleanupItem cleanupStore(RevertStore, iStore); |
335 CleanupStack::PushL(cleanupStore); |
339 CleanupStack::PushL(cleanupStore); |
336 |
340 |
337 TStreamId datastreamid = entry.DataStreamId(); |
341 TStreamId datastreamid = entry.DataStreamId(); |
338 // Data stream needs to be deleted which was written while adding the certificate. |
342 // Data stream needs to be deleted which was written while adding the certificate. |