Alexander Afanasyev | 0ea6e08 | 2013-12-26 15:16:37 -0800 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (C) 2013 Regents of the University of California. |
| 3 | * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
| 4 | * @author: Yingdi Yu <yingdi@cs.ucla.edu> |
| 5 | * @author: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 6 | * See COPYING for copyright and distribution information. |
| 7 | */ |
| 8 | |
| 9 | #ifndef NDN_ASN_EXT_HPP |
| 10 | #define NDN_ASN_EXT_HPP |
| 11 | |
Alexander Afanasyev | 54467af | 2014-01-06 15:45:32 -0800 | [diff] [blame] | 12 | #include <stdexcept> |
Alexander Afanasyev | 1950885 | 2014-01-29 01:01:51 -0800 | [diff] [blame] | 13 | #include "../../common.hpp" |
Junxiao Shi | 482ccc5 | 2014-03-31 13:05:24 -0700 | [diff] [blame] | 14 | #include "../../security/cryptopp.hpp" |
Alexander Afanasyev | 0ea6e08 | 2013-12-26 15:16:37 -0800 | [diff] [blame] | 15 | |
| 16 | namespace ndn { |
| 17 | |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 18 | namespace asn { |
| 19 | |
| 20 | class Error : public std::runtime_error |
| 21 | { |
| 22 | public: |
| 23 | explicit |
| 24 | Error(const std::string& what) |
| 25 | : std::runtime_error(what) |
| 26 | { |
| 27 | } |
| 28 | }; |
| 29 | |
| 30 | } // namespace asn |
Alexander Afanasyev | 0ea6e08 | 2013-12-26 15:16:37 -0800 | [diff] [blame] | 31 | |
| 32 | size_t |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 33 | DEREncodeGeneralTime(CryptoPP::BufferedTransformation& bt, |
| 34 | const time::system_clock::TimePoint& time); |
Alexander Afanasyev | 0ea6e08 | 2013-12-26 15:16:37 -0800 | [diff] [blame] | 35 | |
| 36 | void |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 37 | BERDecodeTime(CryptoPP::BufferedTransformation& bt, |
| 38 | time::system_clock::TimePoint& time); |
Alexander Afanasyev | 0ea6e08 | 2013-12-26 15:16:37 -0800 | [diff] [blame] | 39 | |
| 40 | } // namespace ndn |
| 41 | |
| 42 | #endif // NDN_ASN_EXT_HPP |