From fc4599985ab7617b6565b0de53cf93299192e941 Mon Sep 17 00:00:00 2001 From: Scott Date: Thu, 11 Feb 2016 15:54:27 -0500 Subject: [PATCH] Correct Sodium check PECL Libsodium 1.0.x uses `\Sodium\function_name` instead of `\Sodium::method_name`. --- phpseclib/Net/SSH2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 0f7c8318..c94bb314 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1160,7 +1160,7 @@ class SSH2 'diffie-hellman-group-exchange-sha1', // RFC 4419 'diffie-hellman-group-exchange-sha256', // RFC 4419 ); - if (!class_exists('\Sodium')) { + if (!function_exists('\\Sodium\\library_version_major')) { $kex_algorithms = array_diff( $kex_algorithms, array('curve25519-sha256@libssh.org')