security: Preliminary work with security module changes

Change-Id: I36d86ac22fdc8aa71eed229236673993753489a2
diff --git a/src/encoding/der/der-exception.hpp b/src/encoding/der/der-exception.hpp
index 1d0db2a..5016697 100644
--- a/src/encoding/der/der-exception.hpp
+++ b/src/encoding/der/der-exception.hpp
@@ -9,50 +9,20 @@
 #ifndef NDN_DER_EXCEPTION_HPP
 #define NDN_DER_EXCEPTION_HPP
 
-#include <exception>
+#include <stdexcept>
 #include <string>
 
 namespace ndn {
 
 namespace der {
 
-class DerException : public std::exception {
-public:
-  DerException(const std::string& errorMessage) throw();
-  
-  ~DerException() throw();
-  
-  std::string Msg() { return errorMessage_; }
-  
-  virtual const char* what() const throw() { return errorMessage_.c_str(); }
+struct DerException : public std::runtime_error { DerException(const std::string &msg) : std::runtime_error(msg) {} };
 
-private:
-  const std::string errorMessage_;
-};
+class NegativeLengthException : public DerException { NegativeLengthException(const std::string &msg) : DerException(msg) {} };
 
-class NegativeLengthException : public DerException
-{
-public:
-  NegativeLengthException(const std::string& errorMessage)
-  : DerException(errorMessage)
-  {}
-};
+class DerEncodingException : public DerException { DerEncodingException(const std::string &msg) : DerException(msg) {} };
 
-class DerEncodingException : public DerException
-{
-public:
-  DerEncodingException(const std::string& errorMessage)
-  : DerException(errorMessage)
-  {}
-};
-
-class DerDecodingException : public DerException
-{
-public:
-  DerDecodingException(const std::string& errorMessage)
-  : DerException(errorMessage)
-  {}
-};
+class DerDecodingException : public DerException { DerDecodingException(const std::string &msg) : DerException(msg) {} };
 
 } // der