diff --git a/js/ndnProtocol/components/ndnProtocolService.js b/js/ndnProtocol/components/ndnProtocolService.js
index f3a8909..290f91a 100644
--- a/js/ndnProtocol/components/ndnProtocolService.js
+++ b/js/ndnProtocol/components/ndnProtocolService.js
@@ -111,6 +111,7 @@
     
     this.firstReceivedSegmentNumber = null;
     this.firstReceivedContentObject = null;
+    this.contentSha256 = null;
 }
 
 ContentClosure.prototype.upcall = function(kind, upcallInfo) {
@@ -151,8 +152,7 @@
         var contentUriSpec;
         if (!this.uriEndsWithSegmentNumber && endsWithSegmentNumber(contentObject.name)) {
             var nameWithoutSegmentNumber = new Name
-                (contentObject.name.components.slice
-                 (0, contentObject.name.components.length - 1));
+                (contentObject.name.components.slice(0, contentObject.name.components.length - 1));
             contentUriSpec = "ndn:" + nameWithoutSegmentNumber.to_uri();
         }
         else
@@ -165,9 +165,15 @@
         var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
         this.contentListener.onStart(contentTypeEtc.contentType, contentTypeEtc.contentCharset, 
             ioService.newURI(contentUriSpec, this.uriOriginCharset, null));
+            
+        if (contentObject.name.getContentDigestValue() != null)
+            // We need to compute the content digest.
+            this.contentSha256 = new Sha256();
     }
 
     this.contentListener.onReceivedContent(DataUtils.toString(contentObject.content));
+    if (this.contentSha256 != null)
+        this.contentSha256.update(contentObject.content);
     
     // Check for the special case if the saved content is for the next segment that we need.
     if (this.firstReceivedContentObject != null && 
@@ -179,6 +185,8 @@
         this.firstReceivedContentObject = null;
         
         this.contentListener.onReceivedContent(DataUtils.toString(contentObject.content));        
+        if (this.contentSha256 != null)
+            this.contentSha256.update(contentObject.content);
     }
 
     var finalSegmentNumber = null;
@@ -199,9 +207,17 @@
         components.push(nextSegmentNumber);
         this.ndn.expressInterest(new Name(components), this);
     }
-    else
+    else {
         // Finished.
-        this.contentListener.onStop(); 
+        this.contentListener.onStop();
+        if (this.contentSha256 != null) {
+            var nameContentDigest = contentObject.name.getContentDigestValue();
+            if (nameContentDigest != null &&
+                !DataUtils.arraysEqual(nameContentDigest, this.contentSha256.finalize()))
+                // TODO: How to show the user an error for invalid digest?
+                dump("Content does not match digest in name " + contentObject.name.to_uri());
+        }
+    }
         
     return Closure.RESULT_OK;
 };
@@ -278,4 +294,4 @@
         return "";
     else
         return "?" + terms.join('&');
-}
\ No newline at end of file
+}
