diff --git a/ccnx/ccnx-pco.cpp b/ccnx/ccnx-pco.cpp
index 2c4e351..591f1d3 100644
--- a/ccnx/ccnx-pco.cpp
+++ b/ccnx/ccnx-pco.cpp
@@ -34,22 +34,26 @@
   {
     boost::throw_exception(MisformedContentObjectException());
   }
+
 }
 
-ParsedContentObject::ParsedContentObject(const unsigned char *data, size_t len)
+ParsedContentObject::ParsedContentObject(const unsigned char *data, size_t len, bool verified)
             : m_comps(NULL)
+            , m_verified(verified)
 {
   init(data, len);
 }
 
-ParsedContentObject::ParsedContentObject(const Bytes &bytes)
+ParsedContentObject::ParsedContentObject(const Bytes &bytes, bool verified)
             : m_comps(NULL)
+            , m_verified(verified)
 {
   init(head(bytes), bytes.size());
 }
 
-ParsedContentObject::ParsedContentObject(const ParsedContentObject &other)
+ParsedContentObject::ParsedContentObject(const ParsedContentObject &other, bool verified)
             : m_comps(NULL)
+            , m_verified(verified)
 {
   init(head(other.m_bytes), other.m_bytes.size());
 }
diff --git a/ccnx/ccnx-pco.h b/ccnx/ccnx-pco.h
index cdb2a7e..28b039d 100644
--- a/ccnx/ccnx-pco.h
+++ b/ccnx/ccnx-pco.h
@@ -33,10 +33,10 @@
 class ParsedContentObject
 {
 public:
-  ParsedContentObject(const unsigned char *data, size_t len);
-  ParsedContentObject(const unsigned char *data, const ccn_parsed_ContentObject &pco);
-  ParsedContentObject(const Bytes &bytes);
-  ParsedContentObject(const ParsedContentObject &other);
+  ParsedContentObject(const unsigned char *data, size_t len, bool verified = false);
+  ParsedContentObject(const unsigned char *data, const ccn_parsed_ContentObject &pco, bool verified = false);
+  ParsedContentObject(const Bytes &bytes, bool verified = false);
+  ParsedContentObject(const ParsedContentObject &other, bool verified = false);
   virtual ~ParsedContentObject();
 
   Bytes
@@ -51,6 +51,18 @@
   inline const Bytes &
   buf () const;
 
+  bool
+  verified() const { return m_verified; }
+
+  void
+  setVerified(bool verified) { m_verified = verified; }
+
+  const unsigned char *
+  msg() const { return head(m_bytes); }
+
+  const ccn_parsed_ContentObject *
+  pco() const { return &m_pco; }
+
 private:
   void
   init(const unsigned char *data, size_t len);
@@ -59,6 +71,7 @@
   ccn_parsed_ContentObject m_pco;
   ccn_indexbuf *m_comps;
   Bytes m_bytes;
+  bool m_verified;
 };
 
 const Bytes &
diff --git a/ccnx/ccnx-wrapper.cpp b/ccnx/ccnx-wrapper.cpp
index a9f0821..91148de 100644
--- a/ccnx/ccnx-wrapper.cpp
+++ b/ccnx/ccnx-wrapper.cpp
@@ -475,6 +475,8 @@
   tuple<Closure *, ExecutorPtr, Selectors> *realData = reinterpret_cast< tuple<Closure*, ExecutorPtr, Selectors>* > (selfp->data);
   tie (cp, executor, selectors) = *realData;
 
+  bool verified = false;
+
   switch (kind)
     {
     case CCN_UPCALL_FINAL:  // effecitve in unit tests
@@ -486,6 +488,7 @@
       return CCN_UPCALL_RESULT_OK;
 
     case CCN_UPCALL_CONTENT:
+      verified = true;
       _LOG_TRACE (">> incomingData content upcall: " << Name (info->content_ccnb, info->content_comps));
       break;
 
@@ -512,7 +515,7 @@
       return CCN_UPCALL_RESULT_OK;
     }
 
-  PcoPtr pco = make_shared<ParsedContentObject> (info->content_ccnb, info->pco->offset[CCN_PCO_E]);
+  PcoPtr pco = make_shared<ParsedContentObject> (info->content_ccnb, info->pco->offset[CCN_PCO_E], verified);
 
   // this will be run in executor
   executor->execute (bind (&Closure::runDataCallback, cp, pco->name (), pco));
@@ -694,4 +697,12 @@
   return Name(retval);
 }
 
+bool
+CcnxWrapper::verifyPco(PcoPtr &pco)
+{
+  bool verified = ccn_verify_content(m_handle, pco->msg(), (ccn_parsed_ContentObject *)pco->pco());
+  pco->setVerified(verified);
+  return verified;
+}
+
 }
diff --git a/ccnx/ccnx-wrapper.h b/ccnx/ccnx-wrapper.h
index 6cd1791..1bf6f4c 100644
--- a/ccnx/ccnx-wrapper.h
+++ b/ccnx/ccnx-wrapper.h
@@ -86,6 +86,9 @@
   int
   putToCcnd (const Bytes &contentObject);
 
+  bool
+  verifyPco(PcoPtr &pco);
+
 private:
   CcnxWrapper(const CcnxWrapper &other) {}
 
diff --git a/src/fetcher.cc b/src/fetcher.cc
index be9064a..8f78323 100644
--- a/src/fetcher.cc
+++ b/src/fetcher.cc
@@ -132,8 +132,8 @@
 
   if (m_forwardingHint == Name ())
   {
-    // invoke callback
-    if (!m_segmentCallback.empty ())
+    // check whether data is verified in this case; if verified invoke callback
+    if (!m_segmentCallback.empty () && data->verified())
       {
         m_segmentCallback (m_deviceName, m_name, seqno, data);
       }
@@ -141,9 +141,12 @@
   }
   else
     {
+      // in this case we don't care whether "data" is verified, in fact, we expect it is unverified
       try {
         PcoPtr pco = make_shared<ParsedContentObject> (*data->contentPtr ());
-        if (!m_segmentCallback.empty ())
+
+        // we need to verify this pco and apply callback only when verified
+        if (!m_segmentCallback.empty () && m_ccnx->verifyPco(pco))
           {
             m_segmentCallback (m_deviceName, m_name, seqno, pco);
           }
