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:
parent
71d5c71455
commit
e869dbf9e0
@ -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"))
|
||||
|
@ -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()
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user