aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-29 16:15:41 +0200
committerChocobozzz <me@florianbigard.com>2019-08-29 16:15:41 +0200
commitad513607a3886cfabe083531c42911bc3c67bdfb (patch)
tree275af782814ad3aa62da4834ec5696467aacdd87 /server/tests
parentf0a47bc92aa20b91b46197a4d3fc430aea962848 (diff)
downloadPeerTube-ad513607a3886cfabe083531c42911bc3c67bdfb.tar.gz
PeerTube-ad513607a3886cfabe083531c42911bc3c67bdfb.tar.zst
PeerTube-ad513607a3886cfabe083531c42911bc3c67bdfb.zip
Remove old JSON LD signature implementation
Only PeerTube was compatible with it, and the library has moved on RsaSignature2018 and removed RsaSignature2017 support. We had to create a dirty fork of the RsaSignature2017 branch, which is not ideal. Now we use the Mastodon implementation, that most other AP implementations that support JSONLD signatures use.
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/activitypub/helpers.ts13
1 files changed, 0 insertions, 13 deletions
diff --git a/server/tests/api/activitypub/helpers.ts b/server/tests/api/activitypub/helpers.ts
index 365d0e1ae..0d1f154fe 100644
--- a/server/tests/api/activitypub/helpers.ts
+++ b/server/tests/api/activitypub/helpers.ts
@@ -53,19 +53,6 @@ describe('Test activity pub helpers', function () {
53 expect(result).to.be.false 53 expect(result).to.be.false
54 }) 54 })
55 55
56 it('Should fail with an invalid PeerTube URL', async function () {
57 const keys = require('./json/peertube/keys.json')
58 const body = require('./json/peertube/announce-without-context.json')
59
60 const actorSignature = { url: 'http://localhost:9002/accounts/peertube', privateKey: keys.privateKey }
61 const signedBody = await buildSignedActivity(actorSignature as any, body)
62
63 const fromActor = { publicKey: keys.publicKey, url: 'http://localhost:9003/accounts/peertube' }
64 const result = await isJsonLDSignatureVerified(fromActor as any, signedBody)
65
66 expect(result).to.be.false
67 })
68
69 it('Should succeed with a valid PeerTube signature', async function () { 56 it('Should succeed with a valid PeerTube signature', async function () {
70 const keys = require('./json/peertube/keys.json') 57 const keys = require('./json/peertube/keys.json')
71 const body = require('./json/peertube/announce-without-context.json') 58 const body = require('./json/peertube/announce-without-context.json')