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 | 736708b | 2014-01-06 14:45:34 -0800 | [diff] [blame] | 12 | #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 Afanasyev | 0ea6e08 | 2013-12-26 15:16:37 -0800 | [diff] [blame] | 25 | #include <ndn-cpp/common.hpp> |
| 26 | #include <cryptopp/asn.h> |
| 27 | |
| 28 | namespace ndn { |
| 29 | |
| 30 | namespace Asn { |
| 31 | struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} }; |
| 32 | } |
| 33 | |
| 34 | size_t |
| 35 | DEREncodeGeneralTime(CryptoPP::BufferedTransformation &bt, MillisecondsSince1970 time); |
| 36 | |
| 37 | void |
| 38 | BERDecodeTime(CryptoPP::BufferedTransformation &bt, MillisecondsSince1970 &time); |
| 39 | |
| 40 | } // namespace ndn |
| 41 | |
| 42 | #endif // NDN_ASN_EXT_HPP |
| 43 | |