aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-19 11:41:19 +0200
committerChocobozzz <me@florianbigard.com>2018-10-19 12:59:52 +0200
commitf7509cbec875ec4ee3201cce08839f2a02676c1c (patch)
tree5dbfcff41a175aa7d4b7d396ca90fe26049d0164 /server/initializers/constants.ts
parent333210d862fdba4bb114b756d4f964789f480196 (diff)
downloadPeerTube-f7509cbec875ec4ee3201cce08839f2a02676c1c.tar.gz
PeerTube-f7509cbec875ec4ee3201cce08839f2a02676c1c.tar.zst
PeerTube-f7509cbec875ec4ee3201cce08839f2a02676c1c.zip
Add HTTP signature check before linked signature
It's faster, and will allow us to use RSA signature 2018 (with upstream jsonld-signature module) without too much incompatibilities in the peertube federation
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 1a3b52015..fd2308eb6 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -529,6 +529,12 @@ const ACTIVITY_PUB_ACTOR_TYPES: { [ id: string ]: ActivityPubActorType } = {
529 APPLICATION: 'Application' 529 APPLICATION: 'Application'
530} 530}
531 531
532const HTTP_SIGNATURE = {
533 HEADER_NAME: 'signature',
534 ALGORITHM: 'rsa-sha256',
535 HEADERS_TO_SIGN: [ 'date', 'host', 'digest', '(request-target)' ]
536}
537
532// --------------------------------------------------------------------------- 538// ---------------------------------------------------------------------------
533 539
534const PRIVATE_RSA_KEY_SIZE = 2048 540const PRIVATE_RSA_KEY_SIZE = 2048
@@ -728,6 +734,7 @@ export {
728 VIDEO_EXT_MIMETYPE, 734 VIDEO_EXT_MIMETYPE,
729 CRAWL_REQUEST_CONCURRENCY, 735 CRAWL_REQUEST_CONCURRENCY,
730 JOB_COMPLETED_LIFETIME, 736 JOB_COMPLETED_LIFETIME,
737 HTTP_SIGNATURE,
731 VIDEO_IMPORT_STATES, 738 VIDEO_IMPORT_STATES,
732 VIDEO_VIEW_LIFETIME, 739 VIDEO_VIEW_LIFETIME,
733 buildLanguages 740 buildLanguages