Skip to content
This repository was archived by the owner on Jul 24, 2019. It is now read-only.

Commit 2b64427

Browse files
committedFeb 24, 2016
Merge pull request #476 from connesc/master
Replace MD5 with SHA-256
2 parents e8e4a11 + 1a5bc7e commit 2b64427

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎install.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ function getDownloadUrl() {
398398

399399
/**
400400
* @return {?{url: string, checksum: string}} Get the download URL and expected
401-
* md5 checksum for phantomjs. May return null if no download url exists.
401+
* SHA-256 checksum for phantomjs. May return null if no download url exists.
402402
*/
403403
function getDownloadSpec() {
404404
var cdnUrl = process.env.npm_config_phantomjs_cdnurl ||
@@ -411,16 +411,16 @@ function getDownloadSpec() {
411411
var arch = getTargetArch()
412412
if (platform === 'linux' && arch === 'x64') {
413413
downloadUrl += 'linux-x86_64.tar.bz2'
414-
checksum = '1c947d57fce2f21ce0b43fe2ed7cd361'
414+
checksum = '86dd9a4bf4aee45f1a84c9f61cf1947c1d6dce9b9e8d2a907105da7852460d2f'
415415
} else if (platform === 'linux' && arch == 'ia32') {
416416
downloadUrl += 'linux-i686.tar.bz2'
417-
checksum = '0396e8249e082f72c1e39d33fc9d8de6'
417+
checksum = '80e03cfeb22cc4dfe4e73b68ab81c9fdd7c78968cfd5358e6af33960464f15e3'
418418
} else if (platform === 'darwin' || platform === 'openbsd' || platform === 'freebsd') {
419419
downloadUrl += 'macosx.zip'
420-
checksum = 'b0c038bd139b9ecaad8fd321070c1651'
420+
checksum = '538cf488219ab27e309eafc629e2bcee9976990fe90b1ec334f541779150f8c1'
421421
} else if (platform === 'win32') {
422422
downloadUrl += 'windows.zip'
423-
checksum = '4104470d43ddf2a195e8869deef0aa69'
423+
checksum = 'd9fb05623d6b26d3654d008eab3adafd1f6350433dfd16138c46161f42c7dcc8'
424424
} else {
425425
return null
426426
}
@@ -475,7 +475,7 @@ function downloadPhantomjs() {
475475
* @return {Promise.<boolean>}
476476
*/
477477
function verifyChecksum(fileName, checksum) {
478-
return kew.resolve(hasha.fromFile(fileName, {algorithm: 'md5'})).then(function (hash) {
478+
return kew.resolve(hasha.fromFile(fileName, {algorithm: 'sha256'})).then(function (hash) {
479479
var result = checksum == hash
480480
if (result) {
481481
console.log('Verified checksum of previously downloaded file')

0 commit comments

Comments
 (0)
This repository has been archived.