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__ |
Alexander Afanasyev | 54467af | 2014-01-06 15:45:32 -0800 | [diff] [blame] | 19 | #pragma GCC diagnostic push |
| 20 | #pragma GCC diagnostic ignored "-Wreorder" |
Alexander Afanasyev | 736708b | 2014-01-06 14:45:34 -0800 | [diff] [blame] | 21 | #pragma GCC diagnostic ignored "-Wunused-variable" |
| 22 | #pragma GCC diagnostic ignored "-Wunused-function" |
| 23 | #endif |
| 24 | |
Alexander Afanasyev | 54467af | 2014-01-06 15:45:32 -0800 | [diff] [blame] | 25 | #include <stdexcept> |
Alexander Afanasyev | 0ea6e08 | 2013-12-26 15:16:37 -0800 | [diff] [blame] | 26 | #include <ndn-cpp/common.hpp> |
| 27 | #include <cryptopp/asn.h> |
| 28 | |
| 29 | namespace ndn { |
| 30 | |
| 31 | namespace Asn { |
| 32 | struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} }; |
| 33 | } |
| 34 | |
| 35 | size_t |
| 36 | DEREncodeGeneralTime(CryptoPP::BufferedTransformation &bt, MillisecondsSince1970 time); |
| 37 | |
| 38 | void |
| 39 | BERDecodeTime(CryptoPP::BufferedTransformation &bt, MillisecondsSince1970 &time); |
| 40 | |
| 41 | } // namespace ndn |
| 42 | |
| 43 | #endif // NDN_ASN_EXT_HPP |
| 44 | |