Skip to content

Commit

Permalink
Merge pull request #19 from paragonie-scott/patch-1
Browse files Browse the repository at this point in the history
Allow Certainty v2+
  • Loading branch information
DivineOmega authored Dec 14, 2018
2 parents cc48b59 + 558b75a commit 6050ee1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"require": {
"php": ">=5.6",
"guzzlehttp/guzzle": "^6.3",
"paragonie/certainty": "^1",
"paragonie/certainty": "^1|^2",
"divineomega/do-file-cache-psr-6": "^2.0"
}
}
4 changes: 2 additions & 2 deletions src/PasswordExposedChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ private function getBundleFromCertainty()

// If we can't write to the our Certainty data directory, just
// use the latest bundle from the Certainty package.
return (new Fetch())->getLatestBundle();
return (new Fetch($ourCertaintyDataDir))->getLatestBundle();
} else {
if (PHP_INT_SIZE === 4 && !extension_loaded('sodium')) {

// If the platform would run verification checks slowly, use the
// latest bundle from the Certainty package and disable verification.
return (new Fetch())->getLatestBundle(false, false);
return (new Fetch($ourCertaintyDataDir))->getLatestBundle(false, false);
} else {

// If the platform can run verification checks well enough, get
Expand Down

0 comments on commit 6050ee1

Please sign in to comment.