@@ -398,7 +398,7 @@ function getDownloadUrl() {
398
398
399
399
/**
400
400
* @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.
402
402
*/
403
403
function getDownloadSpec ( ) {
404
404
var cdnUrl = process . env . npm_config_phantomjs_cdnurl ||
@@ -411,16 +411,16 @@ function getDownloadSpec() {
411
411
var arch = getTargetArch ( )
412
412
if ( platform === 'linux' && arch === 'x64' ) {
413
413
downloadUrl += 'linux-x86_64.tar.bz2'
414
- checksum = '1c947d57fce2f21ce0b43fe2ed7cd361 '
414
+ checksum = '86dd9a4bf4aee45f1a84c9f61cf1947c1d6dce9b9e8d2a907105da7852460d2f '
415
415
} else if ( platform === 'linux' && arch == 'ia32' ) {
416
416
downloadUrl += 'linux-i686.tar.bz2'
417
- checksum = '0396e8249e082f72c1e39d33fc9d8de6 '
417
+ checksum = '80e03cfeb22cc4dfe4e73b68ab81c9fdd7c78968cfd5358e6af33960464f15e3 '
418
418
} else if ( platform === 'darwin' || platform === 'openbsd' || platform === 'freebsd' ) {
419
419
downloadUrl += 'macosx.zip'
420
- checksum = 'b0c038bd139b9ecaad8fd321070c1651 '
420
+ checksum = '538cf488219ab27e309eafc629e2bcee9976990fe90b1ec334f541779150f8c1 '
421
421
} else if ( platform === 'win32' ) {
422
422
downloadUrl += 'windows.zip'
423
- checksum = '4104470d43ddf2a195e8869deef0aa69 '
423
+ checksum = 'd9fb05623d6b26d3654d008eab3adafd1f6350433dfd16138c46161f42c7dcc8 '
424
424
} else {
425
425
return null
426
426
}
@@ -475,7 +475,7 @@ function downloadPhantomjs() {
475
475
* @return {Promise.<boolean> }
476
476
*/
477
477
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 ) {
479
479
var result = checksum == hash
480
480
if ( result ) {
481
481
console . log ( 'Verified checksum of previously downloaded file' )
0 commit comments