pldm oem: implement certificate handler
This commit adds code to handle the ceritificate request and
certificate transfer between the host and bmc following pldm oem
file i/o protocol
Change-Id: I8095e0f5ad8c3c5cc796da1cfbe4bb9946af31cf
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>
diff --git a/oem/ibm/libpldmresponder/file_io_by_type.cpp b/oem/ibm/libpldmresponder/file_io_by_type.cpp
index 2ecc3d9..540937c 100644
--- a/oem/ibm/libpldmresponder/file_io_by_type.cpp
+++ b/oem/ibm/libpldmresponder/file_io_by_type.cpp
@@ -2,6 +2,7 @@
#include "file_io_by_type.hpp"
+#include "file_io_type_cert.hpp"
#include "file_io_type_dump.hpp"
#include "file_io_type_lid.hpp"
#include "file_io_type_pel.hpp"
@@ -126,6 +127,13 @@
return std::make_unique<DumpHandler>(fileHandle);
break;
}
+ case PLDM_FILE_TYPE_CERT_SIGNING_REQUEST:
+ case PLDM_FILE_TYPE_SIGNED_CERT:
+ case PLDM_FILE_TYPE_ROOT_CERT:
+ {
+ return std::make_unique<CertHandler>(fileHandle, fileType);
+ break;
+ }
default:
{
throw InternalFailure();