Add credential based challenge using existing cert to request new cert

Change-Id: Iee18c64f55b42e73a3c1c201726d546096dcfef8
Refs: #4052
diff --git a/src/challenge-module/challenge-email.cpp b/src/challenge-module/challenge-email.cpp
index 59f471d..036ccd2 100644
--- a/src/challenge-module/challenge-email.cpp
+++ b/src/challenge-module/challenge-email.cpp
@@ -139,6 +139,7 @@
                                       const std::list<std::string>& paramList)
 {
   JsonSection result;
+  BOOST_ASSERT(status == WAIT_SELECTION);
   BOOST_ASSERT(paramList.size() == 1);
   result.put(JSON_EMAIL, paramList.front());
   return result;