Use PartialName for return from name assignment function
- to allow multi-component suffix
Change-Id: I6f02c6c7964f42cfdc2c5cc3b96391ca56196e10
diff --git a/src/ca-module.cpp b/src/ca-module.cpp
index 4d055e3..322bbb5 100644
--- a/src/ca-module.cpp
+++ b/src/ca-module.cpp
@@ -186,7 +186,7 @@
// process PROBE requests: collect probe parameters
auto parameters = PROBE::decodeApplicationParameters(request.getApplicationParameters());
- std::vector<std::string> availableComponents;
+ std::vector<PartialName> availableComponents;
if (m_config.m_nameAssignmentFunc) {
try {
availableComponents = m_config.m_nameAssignmentFunc(parameters);
diff --git a/src/configuration.hpp b/src/configuration.hpp
index acd1b99..3d9ef9a 100644
--- a/src/configuration.hpp
+++ b/src/configuration.hpp
@@ -87,7 +87,7 @@
* @p vector, input, a list of parameter key-value pair used for name assignment.
* @return a vector containing the possible namespaces derived from the parameters.
*/
-using NameAssignmentFunc = function<std::vector<std::string>(const std::vector<std::tuple<std::string, std::string>>)>;
+using NameAssignmentFunc = function<std::vector<PartialName>(const std::vector<std::tuple<std::string, std::string>>)>;
/**
* @brief The function would be invoked whenever the certificate request status is updated.