]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/constants.js
Server: use crypto instead of ursa for pod signature
[github/Chocobozzz/PeerTube.git] / server / initializers / constants.js
index 6ba8a9da067ff4acd0c3de1d18b67c5a2f0a3394..a6adb75bf6714334e2b6fda470d295e2da3e93ac 100644 (file)
@@ -118,16 +118,21 @@ const REQUEST_ENDPOINTS = {
   VIDEOS: 'videos'
 }
 
-// ---------------------------------------------------------------------------
-
 const REMOTE_SCHEME = {
   HTTP: 'https',
   WS: 'wss'
 }
 
+// ---------------------------------------------------------------------------
+
+const SIGNATURE_ALGORITHM = 'RSA-SHA256'
+const SIGNATURE_ENCODING = 'hex'
+
 // Password encryption
 const BCRYPT_SALT_SIZE = 10
 
+// ---------------------------------------------------------------------------
+
 // Express static paths (router)
 const STATIC_PATHS = {
   PREVIEWS: '/static/previews/',
@@ -143,6 +148,8 @@ let STATIC_MAX_AGE = '30d'
 const THUMBNAILS_SIZE = '200x110'
 const PREVIEWS_SIZE = '640x480'
 
+// ---------------------------------------------------------------------------
+
 const USER_ROLES = {
   ADMIN: 'admin',
   USER: 'user'
@@ -180,6 +187,8 @@ module.exports = {
   REQUESTS_LIMIT,
   RETRY_REQUESTS,
   SEARCHABLE_COLUMNS,
+  SIGNATURE_ALGORITHM,
+  SIGNATURE_ENCODING,
   SORTABLE_COLUMNS,
   STATIC_MAX_AGE,
   STATIC_PATHS,