blob: 1dff7e91900780c0a1289fc467ec371158a081a2 [file] [log] [blame]
Jeff Thompsoncf0fdd92013-10-12 11:54:35 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
3 * Copyright (C) 2013 Regents of the University of California.
Jeff Thompsonc69163b2013-10-12 13:49:50 -07004 * @author: Yingdi Yu <yingdi@cs.ucla.edu>
Jeff Thompsoncf0fdd92013-10-12 11:54:35 -07005 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
6 * See COPYING for copyright and distribution information.
7 */
8
9#ifndef NDN_IDENTITY_CERTIFICATE_HPP
Jeff Thompsone589c3f2013-10-12 17:30:50 -070010#define NDN_IDENTITY_CERTIFICATE_HPP
Jeff Thompsoncf0fdd92013-10-12 11:54:35 -070011
12#include "certificate.hpp"
13
14namespace ndn {
15
16class IdentityCertificate : public Certificate
17{
Jeff Thompsonc69163b2013-10-12 13:49:50 -070018public:
19 /**
20 * The default constructor.
21 */
22 IdentityCertificate();
Jeff Thompsoncf0fdd92013-10-12 11:54:35 -070023
Jeff Thompsonc69163b2013-10-12 13:49:50 -070024 /**
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 Thompson965569b2013-10-12 17:52:52 -070029
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
44private:
45 static bool
46 isCorrectName(const Name& name);
Jeff Thompsoncf0fdd92013-10-12 11:54:35 -070047};
48
49}
50
51#endif