blob: c698495b0ae1cf90b83c38fd2ca80aa5fa0357ad [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 Afanasyev736708b2014-01-06 14:45:34 -080012#if __clang__
13#pragma clang diagnostic push
14#pragma clang diagnostic ignored "-Wreorder"
15#pragma clang diagnostic ignored "-Wtautological-compare"
16#pragma clang diagnostic ignored "-Wunused-variable"
17#pragma clang diagnostic ignored "-Wunused-function"
18#elif __GNUC__
19#pragma GCC diagnostic ignored "-Wreorder"
20#pragma GCC diagnostic ignored "-Wtautological-compare"
21#pragma GCC diagnostic ignored "-Wunused-variable"
22#pragma GCC diagnostic ignored "-Wunused-function"
23#endif
24
Alexander Afanasyev0ea6e082013-12-26 15:16:37 -080025#include <ndn-cpp/common.hpp>
26#include <cryptopp/asn.h>
27
28namespace ndn {
29
30namespace Asn {
31struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} };
32}
33
34size_t
35DEREncodeGeneralTime(CryptoPP::BufferedTransformation &bt, MillisecondsSince1970 time);
36
37void
38BERDecodeTime(CryptoPP::BufferedTransformation &bt, MillisecondsSince1970 &time);
39
40} // namespace ndn
41
42#endif // NDN_ASN_EXT_HPP
43