apply RDR in server command line tool and some format updates

Change-Id: Id59de3e8892e962062151911eb7fadf828ad69c5
diff --git a/src/ca-module.cpp b/src/ca-module.cpp
index 7b806b7..3560568 100644
--- a/src/ca-module.cpp
+++ b/src/ca-module.cpp
@@ -51,8 +51,8 @@
   m_config.load(configPath);
   m_storage = CaStorage::createCaStorage(storageType, m_config.m_caItem.m_caPrefix, "");
   random::generateSecureBytes(m_requestIdGenKey, 32);
-  if (m_config.m_heuristic.size() == 0) {
-    m_config.m_heuristic.push_back(NameAssignmentFuncFactory::createNameAssignmentFuncFactory("random"));
+  if (m_config.m_nameAssignmentFuncs.size() == 0) {
+    m_config.m_nameAssignmentFuncs.push_back(NameAssignmentFunc::createNameAssignmentFunc("random"));
   }
   registerPrefix();
 }
@@ -103,12 +103,6 @@
 }
 
 void
-CaModule::setNameAssignmentFunction(const NameAssignmentFunc& handler)
-{
-  m_config.m_nameAssignmentFunc = handler;
-}
-
-void
 CaModule::setStatusUpdateCallback(const StatusUpdateCallback& onUpdateCallback)
 {
   m_config.m_statusUpdateCallback = onUpdateCallback;
@@ -163,7 +157,7 @@
   // process PROBE requests: collect probe parameters
   auto parameters = PROBE::decodeApplicationParameters(request.getApplicationParameters());
   std::vector<PartialName> availableComponents;
-    for (auto& item : m_config.m_heuristic) {
+    for (auto& item : m_config.m_nameAssignmentFuncs) {
       auto names = item->assignName(parameters);
       availableComponents.insert(availableComponents.end(), names.begin(), names.end());
     }
diff --git a/src/ca-module.hpp b/src/ca-module.hpp
index b1bb3a3..4d6bebe 100644
--- a/src/ca-module.hpp
+++ b/src/ca-module.hpp
@@ -49,9 +49,6 @@
   }
 
   void
-  setNameAssignmentFunction(const NameAssignmentFunc& handler);
-
-  void
   setStatusUpdateCallback(const StatusUpdateCallback& onUpdateCallback);
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
diff --git a/src/ca-storage/ca-storage.cpp b/src/ca-storage/ca-storage.cpp
index dfcced2..657e41e 100644
--- a/src/ca-storage/ca-storage.cpp
+++ b/src/ca-storage/ca-storage.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
diff --git a/src/ca-storage/ca-storage.hpp b/src/ca-storage/ca-storage.hpp
index 7fbc1ec..99af926 100644
--- a/src/ca-storage/ca-storage.hpp
+++ b/src/ca-storage/ca-storage.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 0117df7..3cc4aa7 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -149,15 +149,15 @@
     }
   }
   //parse name assignment if appears
-  m_nameAssignmentFunc = nullptr;
+  m_nameAssignmentFuncs.clear();
   auto nameAssignmentItems = configJson.get_child_optional(CONFIG_NAME_ASSIGNMENT);
   if (nameAssignmentItems) {
     for (const auto item : *nameAssignmentItems) {
-      auto func = NameAssignmentFuncFactory::createNameAssignmentFuncFactory(item.first, item.second.data());
+      auto func = NameAssignmentFunc::createNameAssignmentFunc(item.first, item.second.data());
       if (func == nullptr) {
         BOOST_THROW_EXCEPTION(std::runtime_error("Error on creating name assignment function"));
       }
-      m_heuristic.push_back(std::move(func));
+      m_nameAssignmentFuncs.push_back(std::move(func));
     }
   }
 }
diff --git a/src/configuration.hpp b/src/configuration.hpp
index fd4ab93..40285e0 100644
--- a/src/configuration.hpp
+++ b/src/configuration.hpp
@@ -128,15 +128,13 @@
    */
   boost::optional<std::vector<std::shared_ptr<security::v2::Certificate>>> m_redirection;
   /**
-   * NameAssignmentFunc Callback function
-   */
-  NameAssignmentFunc m_nameAssignmentFunc;
-  /**
    * StatusUpdate Callback function
    */
   StatusUpdateCallback m_statusUpdateCallback;
-
-  std::vector<std::unique_ptr<NameAssignmentFuncFactory>> m_heuristic;
+  /**
+   * Name Assignment Functions
+   */
+  std::vector<std::unique_ptr<NameAssignmentFunc>> m_nameAssignmentFuncs;
 };
 
 /**
diff --git a/src/identity-challenge/challenge-credential.hpp b/src/identity-challenge/challenge-credential.hpp
index 0ecfdb2..2c0229b 100644
--- a/src/identity-challenge/challenge-credential.hpp
+++ b/src/identity-challenge/challenge-credential.hpp
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
diff --git a/src/identity-challenge/challenge-email.cpp b/src/identity-challenge/challenge-email.cpp
index 2775d9e..a439807 100644
--- a/src/identity-challenge/challenge-email.cpp
+++ b/src/identity-challenge/challenge-email.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
diff --git a/src/identity-challenge/challenge-email.hpp b/src/identity-challenge/challenge-email.hpp
index 5cab3cb..79c3db3 100644
--- a/src/identity-challenge/challenge-email.hpp
+++ b/src/identity-challenge/challenge-email.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
diff --git a/src/identity-challenge/challenge-module.cpp b/src/identity-challenge/challenge-module.cpp
index 812a85d..0570ed5 100644
--- a/src/identity-challenge/challenge-module.cpp
+++ b/src/identity-challenge/challenge-module.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
diff --git a/src/identity-challenge/challenge-module.hpp b/src/identity-challenge/challenge-module.hpp
index 4349762..deed763 100644
--- a/src/identity-challenge/challenge-module.hpp
+++ b/src/identity-challenge/challenge-module.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
diff --git a/src/identity-challenge/challenge-pin.cpp b/src/identity-challenge/challenge-pin.cpp
index a5d5580..8886b67 100644
--- a/src/identity-challenge/challenge-pin.cpp
+++ b/src/identity-challenge/challenge-pin.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
diff --git a/src/identity-challenge/challenge-pin.hpp b/src/identity-challenge/challenge-pin.hpp
index 53f7a10..b942c4d 100644
--- a/src/identity-challenge/challenge-pin.hpp
+++ b/src/identity-challenge/challenge-pin.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
diff --git a/src/name-assignments/assignment-funcs.cpp b/src/name-assignments/assignment-funcs.cpp
index 50c8df1..cba9c65 100644
--- a/src/name-assignments/assignment-funcs.cpp
+++ b/src/name-assignments/assignment-funcs.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
@@ -24,7 +24,7 @@
 namespace ndn {
 namespace ndncert {
 
-NameAssignmentFuncFactory::NameAssignmentFuncFactory(const std::string& factoryType, const std::string& format)
+NameAssignmentFunc::NameAssignmentFunc(const std::string& factoryType, const std::string& format)
   : FACTORY_TYPE(factoryType)
 {
   size_t index = 0, startIndex = 0;
@@ -40,18 +40,18 @@
   }
 }
 
-unique_ptr<NameAssignmentFuncFactory>
-NameAssignmentFuncFactory::createNameAssignmentFuncFactory(const std::string& challengeType, const std::string& format)
+unique_ptr<NameAssignmentFunc>
+NameAssignmentFunc::createNameAssignmentFunc(const std::string& challengeType, const std::string& format)
 {
   FuncFactoryFactory& factory = getFactory();
   auto i = factory.find(challengeType);
   return i == factory.end() ? nullptr : i->second(format);
 }
 
-NameAssignmentFuncFactory::FuncFactoryFactory&
-NameAssignmentFuncFactory::getFactory()
+NameAssignmentFunc::FuncFactoryFactory&
+NameAssignmentFunc::getFactory()
 {
-  static NameAssignmentFuncFactory::FuncFactoryFactory factory;
+  static NameAssignmentFunc::FuncFactoryFactory factory;
   return factory;
 }
 
diff --git a/src/name-assignments/assignment-funcs.hpp b/src/name-assignments/assignment-funcs.hpp
index b8c2dd1..39e1261 100644
--- a/src/name-assignments/assignment-funcs.hpp
+++ b/src/name-assignments/assignment-funcs.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
@@ -26,58 +26,55 @@
 namespace ndn {
 namespace ndncert {
 
-/**
- * @brief The name assignment function provided by the CA operator to generate available
- * namecomponents.
- * The function does not guarantee that all the returned names are available. Therefore the
- * CA should further check the availability of each returned name and remove unavailable results.
- *
- * @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<PartialName>(const std::vector<std::tuple<std::string, std::string>>&)>;
-
-class NameAssignmentFuncFactory : noncopyable {
+class NameAssignmentFunc : noncopyable {
 public:
-  explicit
-  NameAssignmentFuncFactory(const std::string& factoryType, const std::string& format = "");
+  explicit NameAssignmentFunc(const std::string& factoryType, const std::string& format = "");
 
-  virtual ~NameAssignmentFuncFactory() = default;
+  virtual ~NameAssignmentFunc() = default;
 
+  /**
+   * @brief The name assignment function provided by the CA operator to generate available
+   * namecomponents.
+   * The function does not guarantee that all the returned names are available. Therefore the
+   * CA should further check the availability of each returned name and remove unavailable results.
+   *
+   * @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.
+   */
+  virtual std::vector<PartialName>
+  assignName(const std::vector<std::tuple<std::string, std::string>>& params) = 0;
+
+  const std::string FACTORY_TYPE;
+  std::vector<std::string> m_nameFormat;
+
+public:
   template <class ChallengeType>
   static void
-  registerNameAssignmentFuncFactories(const std::string& typeName)
+  registerNameAssignmentFunc(const std::string& typeName)
   {
     FuncFactoryFactory& factory = getFactory();
     BOOST_ASSERT(factory.count(typeName) == 0);
     factory[typeName] = [](const std::string& format) { return make_unique<ChallengeType>(format); };
   }
 
-  static unique_ptr<NameAssignmentFuncFactory>
-  createNameAssignmentFuncFactory(const std::string& challengeType, const std::string& format = "");
-
-  virtual std::vector<PartialName>
-  assignName(const std::vector<std::tuple<std::string, std::string>>& params) = 0;
-
-public:
-  const std::string FACTORY_TYPE;
-  std::vector<std::string> m_nameFormat;
+  static unique_ptr<NameAssignmentFunc>
+  createNameAssignmentFunc(const std::string& challengeType, const std::string& format = "");
 
 private:
-  typedef function<unique_ptr<NameAssignmentFuncFactory>(const std::string&)> FactoryCreateFunc;
+  typedef function<unique_ptr<NameAssignmentFunc>(const std::string&)> FactoryCreateFunc;
   typedef std::map<std::string, FactoryCreateFunc> FuncFactoryFactory;
 
   static FuncFactoryFactory&
   getFactory();
 };
 
-#define NDNCERT_REGISTER_FUNCFACTORY(C, T)                               \
-  static class NdnCert##C##FuncFactoryRegistrationClass {                \
-  public:                                                                \
-    NdnCert##C##FuncFactoryRegistrationClass()                           \
-    {                                                                    \
-      ::ndn::ndncert::NameAssignmentFuncFactory::registerNameAssignmentFuncFactories<C>(T); \
-    }                                                                    \
+#define NDNCERT_REGISTER_FUNCFACTORY(C, T)                                        \
+  static class NdnCert##C##FuncFactoryRegistrationClass {                         \
+  public:                                                                         \
+    NdnCert##C##FuncFactoryRegistrationClass()                                    \
+    {                                                                             \
+      ::ndn::ndncert::NameAssignmentFunc::registerNameAssignmentFunc<C>(T);       \
+    }                                                                             \
   } g_NdnCert##C##ChallengeRegistrationVariable
 
 }  // namespace ndncert
diff --git a/src/name-assignments/assignment-hash.cpp b/src/name-assignments/assignment-hash.cpp
index c71b369..7af3bf8 100644
--- a/src/name-assignments/assignment-hash.cpp
+++ b/src/name-assignments/assignment-hash.cpp
@@ -1,6 +1,22 @@
-//
-// Created by Tyler on 10/6/20.
-//
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2017-2020, Regents of the University of California.
+ *
+ * This file is part of ndncert, a certificate management system based on NDN.
+ *
+ * ndncert is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * ndncert is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License along with
+ * ndncert, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndncert authors and contributors.
+ */
 
 #include "assignment-hash.hpp"
 #include <ndn-cxx/util/sha256.hpp>
@@ -11,7 +27,7 @@
 NDNCERT_REGISTER_FUNCFACTORY(AssignmentHash, "hash");
 
 AssignmentHash::AssignmentHash(const std::string& format)
-  : NameAssignmentFuncFactory("hash", format)
+  : NameAssignmentFunc("hash", format)
 {}
 
 std::vector<PartialName>
diff --git a/src/name-assignments/assignment-hash.hpp b/src/name-assignments/assignment-hash.hpp
index 9054bb7..b0cf417 100644
--- a/src/name-assignments/assignment-hash.hpp
+++ b/src/name-assignments/assignment-hash.hpp
@@ -1,6 +1,22 @@
-//
-// Created by Tyler on 10/6/20.
-//
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2017-2020, Regents of the University of California.
+ *
+ * This file is part of ndncert, a certificate management system based on NDN.
+ *
+ * ndncert is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * ndncert is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License along with
+ * ndncert, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndncert authors and contributors.
+ */
 
 #ifndef NDNCERT_ASSIGNMENT_HASH_HPP
 #define NDNCERT_ASSIGNMENT_HASH_HPP
@@ -13,7 +29,7 @@
 /**
  * assign names base on client probe parameter
  */
-class AssignmentHash: public NameAssignmentFuncFactory {
+class AssignmentHash: public NameAssignmentFunc {
 public:
   AssignmentHash(const std::string& format = "");
 
diff --git a/src/name-assignments/assignment-param.cpp b/src/name-assignments/assignment-param.cpp
index 890af34..cf54951 100644
--- a/src/name-assignments/assignment-param.cpp
+++ b/src/name-assignments/assignment-param.cpp
@@ -1,6 +1,22 @@
-//
-// Created by Tyler on 10/6/20.
-//
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2017-2020, Regents of the University of California.
+ *
+ * This file is part of ndncert, a certificate management system based on NDN.
+ *
+ * ndncert is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * ndncert is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License along with
+ * ndncert, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndncert authors and contributors.
+ */
 
 #include "assignment-param.hpp"
 
@@ -10,7 +26,7 @@
 NDNCERT_REGISTER_FUNCFACTORY(AssignmentParam, "param");
 
 AssignmentParam::AssignmentParam(const std::string& format)
-  : NameAssignmentFuncFactory("param", format)
+  : NameAssignmentFunc("param", format)
 {}
 
 std::vector<PartialName>
diff --git a/src/name-assignments/assignment-param.hpp b/src/name-assignments/assignment-param.hpp
index 9633a57..6b705df 100644
--- a/src/name-assignments/assignment-param.hpp
+++ b/src/name-assignments/assignment-param.hpp
@@ -1,6 +1,22 @@
-//
-// Created by Tyler on 10/6/20.
-//
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2017-2020, Regents of the University of California.
+ *
+ * This file is part of ndncert, a certificate management system based on NDN.
+ *
+ * ndncert is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * ndncert is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License along with
+ * ndncert, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndncert authors and contributors.
+ */
 
 #ifndef NDNCERT_ASSIGNMENT_PARAM_HPP
 #define NDNCERT_ASSIGNMENT_PARAM_HPP
@@ -13,7 +29,7 @@
 /**
  * assign names base on client probe parameter
  */
-class AssignmentParam: public NameAssignmentFuncFactory{
+class AssignmentParam: public NameAssignmentFunc{
 public:
   AssignmentParam(const std::string& format = "");
 
diff --git a/src/name-assignments/assignment-random.cpp b/src/name-assignments/assignment-random.cpp
index 88e9a91..7b24481 100644
--- a/src/name-assignments/assignment-random.cpp
+++ b/src/name-assignments/assignment-random.cpp
@@ -1,6 +1,22 @@
-//
-// Created by Tyler on 10/6/20.
-//
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2017-2020, Regents of the University of California.
+ *
+ * This file is part of ndncert, a certificate management system based on NDN.
+ *
+ * ndncert is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * ndncert is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License along with
+ * ndncert, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndncert authors and contributors.
+ */
 
 #include "assignment-random.hpp"
 #include <ndn-cxx/util/random.hpp>
@@ -11,7 +27,7 @@
 NDNCERT_REGISTER_FUNCFACTORY(AssignmentRandom, "random");
 
 AssignmentRandom::AssignmentRandom(const std::string& format)
-  : NameAssignmentFuncFactory("random", format)
+  : NameAssignmentFunc("random", format)
 {}
 
 std::vector<PartialName>
diff --git a/src/name-assignments/assignment-random.hpp b/src/name-assignments/assignment-random.hpp
index c35c143..a3e30dd 100644
--- a/src/name-assignments/assignment-random.hpp
+++ b/src/name-assignments/assignment-random.hpp
@@ -1,6 +1,22 @@
-//
-// Created by Tyler on 10/6/20.
-//
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2017-2020, Regents of the University of California.
+ *
+ * This file is part of ndncert, a certificate management system based on NDN.
+ *
+ * ndncert is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * ndncert is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License along with
+ * ndncert, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndncert authors and contributors.
+ */
 
 #ifndef NDNCERT_ASSIGNMENT_RANDOM_HPP
 #define NDNCERT_ASSIGNMENT_RANDOM_HPP
@@ -13,7 +29,7 @@
 /**
  * assign names base on client probe parameter
  */
-class AssignmentRandom: public NameAssignmentFuncFactory {
+class AssignmentRandom: public NameAssignmentFunc {
 public:
   AssignmentRandom(const std::string& format = "");