namespace CKM {
-namespace {
template <class T>
-int getCertChain(
+int ManagerImpl::getCertChain(
ServiceConnection & serviceConnection,
LogicCommand command,
int counter,
int retCommand;
int retCounter;
+ bool retCCModeState;
RawBufferVector rawBufferVector;
- recv.Deserialize(retCommand, retCounter, retCode, rawBufferVector);
+ recv.Deserialize(retCommand, retCounter, retCode, rawBufferVector, retCCModeState);
+
+ LogDebug("CCModeState[" << (retCCModeState ? "TRUE" : "FALSE") << "]");
if ((counter != retCounter) || (static_cast<int>(command) != retCommand)) {
return CKM_API_ERROR_UNKNOWN;
certificateChainVector.push_back(cert);
}
+ if (retCCModeState) {
+ int ocspStatus;
+ retCode = ocspCheck(certificateChainVector, ocspStatus);
+
+ if ((retCode == CKM_API_SUCCESS) && (ocspStatus != CKM_API_OCSP_STATUS_GOOD)) {
+ retCode = CKM_API_ERROR_VERIFICATION_FAILED;
+ }
+ }
+
return retCode;
});
}
-} // namespace anonymous
-
ManagerImpl::ManagerImpl()
: m_counter(0), m_storageConnection(SERVICE_SOCKET_CKM_STORAGE), m_ocspConnection(SERVICE_SOCKET_OCSP)
{