blob: b02b3e9e73e1c2b7776e581bfed2e8e19c4dcbb5 [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"
Alexander Afanasyev0ea6e082013-12-26 15:16:37 -080014#include <cryptopp/asn.h>
15
16namespace ndn {
17
18namespace Asn {
Alexander Afanasyevaa0e7da2014-03-17 14:37:33 -070019struct Error : public std::runtime_error { Error(const std::string& what) : std::runtime_error(what) {} };
Alexander Afanasyev0ea6e082013-12-26 15:16:37 -080020}
21
22size_t
Alexander Afanasyevaa0e7da2014-03-17 14:37:33 -070023DEREncodeGeneralTime(CryptoPP::BufferedTransformation& bt, const time::system_clock::TimePoint& time);
Alexander Afanasyev0ea6e082013-12-26 15:16:37 -080024
25void
Alexander Afanasyevaa0e7da2014-03-17 14:37:33 -070026BERDecodeTime(CryptoPP::BufferedTransformation& bt, time::system_clock::TimePoint& time);
Alexander Afanasyev0ea6e082013-12-26 15:16:37 -080027
28} // namespace ndn
29
30#endif // NDN_ASN_EXT_HPP
31