blob: 8cb244dfd30a06d795401641a93bd81a36e36538 [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 */
Jeff Thompson173fd432013-10-12 18:16:41 -070022 IdentityCertificate()
23 {
24 }
Jeff Thompsoncf0fdd92013-10-12 11:54:35 -070025
Jeff Thompsonc69163b2013-10-12 13:49:50 -070026 /**
27 * Create an IdentityCertificate from the content in the data packet.
28 * @param data The data packet with the content to decode.
29 */
30 IdentityCertificate(const Data& data);
Jeff Thompson965569b2013-10-12 17:52:52 -070031
32 /**
33 * The virtual destructor.
34 */
35 virtual
36 ~IdentityCertificate();
Jeff Thompson173fd432013-10-12 18:16:41 -070037
38 Data &
39 setName(const Name& name);
Jeff Thompson965569b2013-10-12 17:52:52 -070040
41 virtual Name
Jeff Thompson173fd432013-10-12 18:16:41 -070042 getPublicKeyName() const;
Jeff Thompson965569b2013-10-12 17:52:52 -070043
44 static bool
45 isIdentityCertificate(const Certificate& certificate);
46
47private:
48 static bool
49 isCorrectName(const Name& name);
Jeff Thompsoncf0fdd92013-10-12 11:54:35 -070050};
51
52}
53
54#endif