In ContentObject constructor, remove unused signature argument
diff --git a/js/ContentObject.js b/js/ContentObject.js
index 38c8066..ec2efde 100644
--- a/js/ContentObject.js
+++ b/js/ContentObject.js
@@ -11,9 +11,8 @@
* @param {Name} name
* @param {SignedInfo} signedInfo
* @param {Uint8Array} content
- * @param {Signature} signature
*/
-var ContentObject = function ContentObject(name, signedInfo, content, signature) {
+var ContentObject = function ContentObject(name, signedInfo, content) {
if (typeof name == 'string')
this.name = new Name(name);
else
@@ -27,7 +26,7 @@
else
this.content = content;
- this.signature = signature;
+ this.signature = new Signature();
this.startSIG = null;
this.endSIG = null;
diff --git a/js/NDN.js b/js/NDN.js
index d0fdb81..f88f178 100644
--- a/js/NDN.js
+++ b/js/NDN.js
@@ -341,7 +341,7 @@
var si = new SignedInfo();
si.setFields();
- var co = new ContentObject(new Name(), si, bytes, new Signature());
+ var co = new ContentObject(new Name(), si, bytes);
co.sign();
var coBinary = encodeToBinaryContentObject(co);
diff --git a/tests/test-encode-decode-ContentObject.html b/tests/test-encode-decode-ContentObject.html
index 1c2cfe0..0f754f7 100644
--- a/tests/test-encode-decode-ContentObject.html
+++ b/tests/test-encode-decode-ContentObject.html
@@ -22,11 +22,7 @@
signedInfo.setFields();
- //witness is null
- var signature = new Signature();
-
-
- var co = new ContentObject(contentname,signedInfo,content,signature);
+ var co = new ContentObject(contentname, signedInfo, content);
co.sign();
diff --git a/tests/test-publish-async.html b/tests/test-publish-async.html
index e3844e6..a8c0b66 100644
--- a/tests/test-publish-async.html
+++ b/tests/test-publish-async.html
@@ -33,7 +33,7 @@
var si = new SignedInfo();
- var co = new ContentObject(new Name(nameStr), si, content, new Signature());
+ var co = new ContentObject(new Name(nameStr), si, content);
co.sign();
upcallInfo.contentObject = co;