1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

fix test for validate proof by another lib

This commit is contained in:
Bill Barman 2018-11-20 19:28:02 +08:00
parent 71d5c71455
commit e869dbf9e0
2 changed files with 3 additions and 9 deletions

View File

@ -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"))

View File

@ -115,13 +115,7 @@ describe("libDDO", () => {
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()
ddo.validateProof()
})
})