Browse files

polish provenance

  • Loading branch information...
1 parent c77bd42 commit befc975773089c5f708e1999494047920dc038fd @astro committed Jun 18, 2011
Showing with 6 additions and 11 deletions.
  1. +4 −0 package.json
  2. +0 −8 src/provenance.cc
  3. +2 −3 tests/test_salmon.js
View
4 package.json
@@ -7,6 +7,10 @@
, "author": "Laurent Eschenauer <laurent@eschenauer.be> (http://eschnou.com)"
, "bin" : { "status" : "./bin/status.js", "profile": "./bin/profile.js", "webfinger": "./bin/webfinger.js"}
, "main" : "./lib/ostatus"
+, "scripts" : {
+ "install": "node-waf configure build"
+ ,"update": "node-waf build"
+}
, "repository" : { "type": "git", "url": "https://github.com/eschnou/node-ostatus.git"}
, "dependencies" : {
"mu" : "http://github.com/raycmorgan/Mu/tarball/v2"
View
8 src/provenance.cc
@@ -194,10 +194,6 @@ static Handle<Value> SignRSASHA256(const Arguments &args) {
Local<Value> exception = Exception::Error(String::New("Cannot sign"));
return ThrowException(exception);
}
- printf("sig:");
- for(int i=0; i < sigLen;i++)
- printf(" %02X",sig[i]);
- printf("\n");
Handle<Value> sigResult = makeBuffer(sig, sigLen);
EVP_PKEY_free(pkey);
@@ -252,10 +248,6 @@ static Handle<Value> VerifyRSASHA256(const Arguments &args) {
EVP_PKEY_set1_RSA(pkey, rsa);
/* Pass sig */
- /*printf("vsig:");
- for(int i=0; i < sigLen;i++)
- printf(" %02X",sigBuf[i]);
- printf("\n");*/
int status = EVP_VerifyFinal(&mdctx, (unsigned char *)Buffer::Data(sig), Buffer::Length(sig), pkey);
EVP_PKEY_free(pkey);
View
5 tests/test_salmon.js
@@ -20,7 +20,6 @@ Vows.describe('Salmon').addBatch({
topic: function() {
this.me = { data: 'Hello World',
data_type: 'application/test' };
-console.log({sign:[this.me,this.key.private]})
this.sig = Salmon.generateSignature(this.me, this.key.private);
this.callback();
},
@@ -29,7 +28,6 @@ console.log({sign:[this.me,this.key.private]})
},
'can be verified': {
topic: function() {
-console.log({verify:[this.me,this.sig,this.key.public]})
this.verified = Salmon.verifySignature(this.me, this.sig, this.key.public);
this.callback();
},
@@ -41,7 +39,8 @@ console.log({verify:[this.me,this.sig,this.key.public]})
}
},
- 'spec example': {
+ /* http://code.google.com/p/salmon-protocol/issues/detail?id=8 */
+ 'invalid spec example': {
'should work': {
topic: function() {
var pubKey = "RSA.mVgY8RN6URBTstndvmUUPb4UZTdwvwmddSKE5z_jvKUEK6yk1u3rrC9yN8k6FilGj9K0eeUPe2hf4Pj-5CmHww.AQAB";

0 comments on commit befc975

Please sign in to comment.