diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-19 11:41:19 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-19 12:26:37 +0200 |
commit | 41f2ebae4f970932fb62d2d8923b1f776f0b1494 (patch) | |
tree | 9e3f89e6363fc63e77d352f07956d1b6ff0cacda /server/initializers/constants.ts | |
parent | d23e6a1c97a6ae3ca8d340a8c9adad268a5be57e (diff) | |
download | PeerTube-41f2ebae4f970932fb62d2d8923b1f776f0b1494.tar.gz PeerTube-41f2ebae4f970932fb62d2d8923b1f776f0b1494.tar.zst PeerTube-41f2ebae4f970932fb62d2d8923b1f776f0b1494.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.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index e8843a3ab..28d51068b 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -532,6 +532,12 @@ const ACTIVITY_PUB_ACTOR_TYPES: { [ id: string ]: ActivityPubActorType } = { | |||
532 | APPLICATION: 'Application' | 532 | APPLICATION: 'Application' |
533 | } | 533 | } |
534 | 534 | ||
535 | const HTTP_SIGNATURE = { | ||
536 | HEADER_NAME: 'signature', | ||
537 | ALGORITHM: 'rsa-sha256', | ||
538 | HEADERS_TO_SIGN: [ 'date', 'host', 'digest', '(request-target)' ] | ||
539 | } | ||
540 | |||
535 | // --------------------------------------------------------------------------- | 541 | // --------------------------------------------------------------------------- |
536 | 542 | ||
537 | const PRIVATE_RSA_KEY_SIZE = 2048 | 543 | const PRIVATE_RSA_KEY_SIZE = 2048 |
@@ -731,6 +737,7 @@ export { | |||
731 | VIDEO_EXT_MIMETYPE, | 737 | VIDEO_EXT_MIMETYPE, |
732 | CRAWL_REQUEST_CONCURRENCY, | 738 | CRAWL_REQUEST_CONCURRENCY, |
733 | JOB_COMPLETED_LIFETIME, | 739 | JOB_COMPLETED_LIFETIME, |
740 | HTTP_SIGNATURE, | ||
734 | VIDEO_IMPORT_STATES, | 741 | VIDEO_IMPORT_STATES, |
735 | VIDEO_VIEW_LIFETIME, | 742 | VIDEO_VIEW_LIFETIME, |
736 | buildLanguages | 743 | buildLanguages |