name-component: recognize typed name components
refs #4526
Change-Id: I9d32a5dc216c6b0921d181573a4e043fccc2814e
diff --git a/src/exclude.cpp b/src/exclude.cpp
index f352948..bf6bfef 100644
--- a/src/exclude.cpp
+++ b/src/exclude.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -194,6 +194,9 @@
catch (const name::Component::Error&) {
BOOST_THROW_EXCEPTION(Error("Incorrect format of Exclude filter"));
}
+ if (!component.isGeneric() && !component.isImplicitSha256Digest()) {
+ BOOST_THROW_EXCEPTION(Error("Excluded component must be generic or ImplicitSha256Digest"));
+ }
++i;
if (i != m_wire.elements_end() && i->type() == tlv::Any) {