Jeff Thompson | cf0fdd9 | 2013-10-12 11:54:35 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2013 Regents of the University of California. |
Jeff Thompson | c69163b | 2013-10-12 13:49:50 -0700 | [diff] [blame] | 4 | * @author: Yingdi Yu <yingdi@cs.ucla.edu> |
Jeff Thompson | cf0fdd9 | 2013-10-12 11:54:35 -0700 | [diff] [blame] | 5 | * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
| 6 | * See COPYING for copyright and distribution information. |
| 7 | */ |
| 8 | |
| 9 | #ifndef NDN_IDENTITY_CERTIFICATE_HPP |
Jeff Thompson | e589c3f | 2013-10-12 17:30:50 -0700 | [diff] [blame] | 10 | #define NDN_IDENTITY_CERTIFICATE_HPP |
Jeff Thompson | cf0fdd9 | 2013-10-12 11:54:35 -0700 | [diff] [blame] | 11 | |
| 12 | #include "certificate.hpp" |
| 13 | |
| 14 | namespace ndn { |
| 15 | |
| 16 | class IdentityCertificate : public Certificate |
| 17 | { |
Jeff Thompson | c69163b | 2013-10-12 13:49:50 -0700 | [diff] [blame] | 18 | public: |
| 19 | /** |
| 20 | * The default constructor. |
| 21 | */ |
| 22 | IdentityCertificate(); |
Jeff Thompson | cf0fdd9 | 2013-10-12 11:54:35 -0700 | [diff] [blame] | 23 | |
Jeff Thompson | c69163b | 2013-10-12 13:49:50 -0700 | [diff] [blame] | 24 | /** |
| 25 | * Create an IdentityCertificate from the content in the data packet. |
| 26 | * @param data The data packet with the content to decode. |
| 27 | */ |
| 28 | IdentityCertificate(const Data& data); |
Jeff Thompson | 965569b | 2013-10-12 17:52:52 -0700 | [diff] [blame^] | 29 | |
| 30 | /** |
| 31 | * The virtual destructor. |
| 32 | */ |
| 33 | virtual |
| 34 | ~IdentityCertificate(); |
| 35 | Data & |
| 36 | setName (const Name& name); |
| 37 | |
| 38 | virtual Name |
| 39 | getPublicKeyName () const; |
| 40 | |
| 41 | static bool |
| 42 | isIdentityCertificate(const Certificate& certificate); |
| 43 | |
| 44 | private: |
| 45 | static bool |
| 46 | isCorrectName(const Name& name); |
Jeff Thompson | cf0fdd9 | 2013-10-12 11:54:35 -0700 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | } |
| 50 | |
| 51 | #endif |