Fix parameter validation in ocsp
[platform/core/security/key-manager.git] / src / manager / client-async / client-manager-async-impl.cpp
index a04645e..2a37c24 100644 (file)
@@ -248,6 +248,8 @@ void ManagerAsync::Impl::ocspCheck(const ObserverPtr& observer,
     try_catch_async([&] {
         RawBufferVector rawCertChain;
         for (auto &e: certificateChainVector) {
+            if(!e || e->empty())
+                return observer->ReceivedError(CKM_API_ERROR_INPUT_PARAM);
             rawCertChain.push_back(e->getDER());
         }