Skip to content

Commit

Permalink
Bump minimum supported to 1.0.15 for sanity.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Jan 5, 2018
1 parent 2526b67 commit cdbe58e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ before_install:
- sudo apt-get install make build-essential automake
- git clone git://github.com/jedisct1/libsodium.git
- cd libsodium
- git checkout 1.0.13
- git checkout 1.0.15
- ./autogen.sh
- ./configure && make check
- sudo make install
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ Before you can use Halite, you must choose a version that fits the requirements
of your project. The differences between the requirements for the available
versions of Halite are briefly highlighted below.

| | PHP | libsodium | PECL libsodium |
|------------------------------------------------------------|-------|-----------|----------------|
| Halite 4 | 7.2.0 | 1.0.13 | N/A (standard) |
| [Halite 3](https://github.com/paragonie/halite/tree/v3.x) | 7.0.0 | 1.0.9 | 1.0.6 / 2.0.4 |
| [Halite 2](https://github.com/paragonie/halite/tree/v2.2) | 7.0.0 | 1.0.9 | 1.0.6 |
| | PHP | libsodium | PECL libsodium |
|-------------------------------------------------------------|-------|-----------|----------------|
| Halite 4.1 and newer | 7.2.0 | 1.0.15 | N/A (standard) |
| [Halite 4.0](https://github.com/paragonie/halite/tree/v4.0) | 7.2.0 | 1.0.13 | N/A (standard) |
| [Halite 3](https://github.com/paragonie/halite/tree/v3.x) | 7.0.0 | 1.0.9 | 1.0.6 / 2.0.4 |
| [Halite 2](https://github.com/paragonie/halite/tree/v2.2) | 7.0.0 | 1.0.9 | 1.0.6 |

If you need a version of Halite before 4.0, see the documentation relevant to that
particular branch.
Expand Down
7 changes: 3 additions & 4 deletions src/Halite.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*/
final class Halite
{
const VERSION = '4.0.0';
const VERSION = '4.1.0';

const HALITE_VERSION_KEYS = "\x31\x40\x04\x00";
const HALITE_VERSION_FILE = "\x31\x41\x04\x00";
Expand Down Expand Up @@ -148,10 +148,9 @@ public static function isLibsodiumSetupCorrectly(bool $echo = false): bool

// Require libsodium 1.0.13
$major = \SODIUM_LIBRARY_MAJOR_VERSION;
$minor = \SODIUM_LIBRARY_MINOR_VERSION;
if ($major < 9 || ($major === 9 && $minor < 5)) {
if ($major < 10) {
if ($echo) {
echo 'Halite needs libsodium 1.0.13 or higher. You have: ',
echo 'Halite needs libsodium 1.0.15 or higher. You have: ',
\SODIUM_LIBRARY_VERSION, "\n";
}
return false;
Expand Down

0 comments on commit cdbe58e

Please sign in to comment.