blob: 5d726dc893bf5bc6875b9b17f32a458dd72ea7c9 [file] [log] [blame]
Alexander Afanasyev0ea6e082013-12-26 15:16:37 -08001/**
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 Afanasyev54467af2014-01-06 15:45:32 -080012#include <stdexcept>
Alexander Afanasyev19508852014-01-29 01:01:51 -080013#include "../../common.hpp"
Junxiao Shi482ccc52014-03-31 13:05:24 -070014#include "../../security/cryptopp.hpp"
Alexander Afanasyev0ea6e082013-12-26 15:16:37 -080015
16namespace ndn {
17
Alexander Afanasyevfdbfc6d2014-04-14 15:12:11 -070018namespace asn {
19
20class Error : public std::runtime_error
21{
22public:
23 explicit
24 Error(const std::string& what)
25 : std::runtime_error(what)
26 {
27 }
28};
29
30} // namespace asn
Alexander Afanasyev0ea6e082013-12-26 15:16:37 -080031
32size_t
Alexander Afanasyevfdbfc6d2014-04-14 15:12:11 -070033DEREncodeGeneralTime(CryptoPP::BufferedTransformation& bt,
34 const time::system_clock::TimePoint& time);
Alexander Afanasyev0ea6e082013-12-26 15:16:37 -080035
36void
Alexander Afanasyevfdbfc6d2014-04-14 15:12:11 -070037BERDecodeTime(CryptoPP::BufferedTransformation& bt,
38 time::system_clock::TimePoint& time);
Alexander Afanasyev0ea6e082013-12-26 15:16:37 -080039
40} // namespace ndn
41
42#endif // NDN_ASN_EXT_HPP