aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/helpers/peertube-crypto.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts
index 1d9cab2ce..8aca50900 100644
--- a/server/helpers/peertube-crypto.ts
+++ b/server/helpers/peertube-crypto.ts
@@ -135,12 +135,11 @@ export {
135// --------------------------------------------------------------------------- 135// ---------------------------------------------------------------------------
136 136
137function hashObject (obj: any): Promise<any> { 137function hashObject (obj: any): Promise<any> {
138 return jsonld.promises 138 return jsonld.promises.normalize(obj, {
139 .normalize(obj, { 139 safe: false,
140 algorithm: 'URDNA2015', 140 algorithm: 'URDNA2015',
141 format: 'application/n-quads' 141 format: 'application/n-quads'
142 }) 142 }).then(res => sha256(res))
143 .then(res => sha256(res))
144} 143}
145 144
146function createSignatureHash (signature: any) { 145function createSignatureHash (signature: any) {