aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.js')
-rw-r--r--src/utils.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils.js b/src/utils.js
index 0b21565dd..82a62c43f 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -63,7 +63,7 @@
63 63
64 // Signature ? 64 // Signature ?
65 if (all.method === 'POST' && all.data && all.sign === true) { 65 if (all.method === 'POST' && all.data && all.sign === true) {
66 var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'petube.key.pem')) 66 var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'peertube.key.pem'))
67 signature = myKey.hashAndSign('sha256', url, 'utf8', 'hex') 67 signature = myKey.hashAndSign('sha256', url, 'utf8', 'hex')
68 } 68 }
69 69
@@ -111,7 +111,7 @@
111 } 111 }
112 112
113 utils.certsExist = function (callback) { 113 utils.certsExist = function (callback) {
114 fs.exists(utils.certDir + 'petube.key.pem', function (exists) { 114 fs.exists(utils.certDir + 'peertube.key.pem', function (exists) {
115 return callback(exists) 115 return callback(exists)
116 }) 116 })
117 } 117 }
@@ -125,14 +125,14 @@
125 } 125 }
126 126
127 logger.debug('Gen RSA keys...') 127 logger.debug('Gen RSA keys...')
128 openssl.exec('genrsa', { 'out': utils.certDir + 'petube.key.pem' }, function (err) { 128 openssl.exec('genrsa', { 'out': utils.certDir + 'peertube.key.pem' }, function (err) {
129 if (err) { 129 if (err) {
130 logger.error('Cannot create private key on this pod.', { error: err }) 130 logger.error('Cannot create private key on this pod.', { error: err })
131 return callback(err) 131 return callback(err)
132 } 132 }
133 133
134 logger.debug('Manage public key...') 134 logger.debug('Manage public key...')
135 openssl.exec('rsa', { 'in': utils.certDir + 'petube.key.pem', 'pubout': true, 'out': utils.certDir + 'petube.pub' }, function (err) { 135 openssl.exec('rsa', { 'in': utils.certDir + 'peertube.key.pem', 'pubout': true, 'out': utils.certDir + 'peertube.pub' }, function (err) {
136 if (err) { 136 if (err) {
137 logger.error('Cannot create public key on this pod .', { error: err }) 137 logger.error('Cannot create public key on this pod .', { error: err })
138 return callback(err) 138 return callback(err)