From fee6431badeeab42d2a59f94f365e345ab826705 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 59ce16e0..f006cf33 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1171,7 +1171,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')