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