diff --git a/src/libDDO/DDO.ts b/src/libDDO/DDO.ts index fb0c89f..e3d344b 100644 --- a/src/libDDO/DDO.ts +++ b/src/libDDO/DDO.ts @@ -33,7 +33,7 @@ export default class DDO { } public static signText(text: string, keyValue: string, signType: string): string { - const signature = "" + let signature = "" if ( signType === PublicKey.TYPE_RSA ) { const key = ursa.createPrivateKey(keyValue) // console.log("privkey", keyValue, key.toPrivatePem("utf8")) diff --git a/test/ddo_lib/DDO.test.ts b/test/ddo_lib/DDO.test.ts index f9dc37c..2399a56 100644 --- a/test/ddo_lib/DDO.test.ts +++ b/test/ddo_lib/DDO.test.ts @@ -114,14 +114,8 @@ describe("libDDO", () => { it("should have a valid ddo proof", async () => { var ddo = new DDO(jsonDDO) assert(ddo) - assert(ddo.validate()) - // TODO: currently the python proof signature is not the same as - // the validation signature for nodeJS - // FIXME: python does PKCS1_v1_5 padding, but this does not seem to be - // supported in ursa (only PKCS1_v1). - - -// ddo.validateProof() + assert(ddo.validate()) + ddo.validateProof() }) })