1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-27 04:34:45 +01:00
Commit Graph

1148 Commits

Author SHA1 Message Date
terrafrost
fadefe5594 Merge branch '1.0' of https://github.com/terrafrost/phpseclib into 1.0 2016-06-22 09:57:11 -05:00
andrewbelcher
dd754283bb Fix zero salt length RSA signatures. 2016-06-21 22:33:47 -05:00
Mathieu Pipet
6c8affcf11 fixed sending stream resulting in a zero byte file 2016-06-19 19:44:06 -05:00
terrafrost
b6801c837c X509: set parameter fields to null for CSR's / RSA 2016-06-19 10:53:20 -05:00
terrafrost
6ff421d354 BigInteger/RSA: don't compare openssl versions > 1.0 2016-06-18 23:28:33 -05:00
terrafrost
002a927746 Merge branch 'x509-constructed-dns' into 1.0 2016-06-12 14:19:08 -05:00
terrafrost
942d194d0a RSA: don't attempt to use the CRT when zero value components exist 2016-05-09 13:46:28 -05:00
terrafrost
bf31e976c7 RSA: fix PHP4 compatability issue 2016-05-06 22:18:12 -05:00
terrafrost
27d9bde6d2 Merge branch 'sftp_readable_writable-1.0' into 1.0 2016-05-06 11:55:50 -05:00
artyhedgehog
0dd04d1e9b Fixed confusing SSH2::getErrors return type 2016-05-06 11:49:24 -05:00
terrafrost
e762b0dc29 SFTP: add is_writable, is_writeable and is_readable 2016-05-05 16:41:15 -05:00
terrafrost
52a7aee1f5 X509: add support for constructed DNs and non-strict DN checks 2016-05-03 18:22:53 -05:00
terrafrost
a521bd405f Merge branch '1.0' of https://github.com/phpseclib/phpseclib into 1.0 2016-04-28 10:29:11 -05:00
terrafrost
d22bcd63cc SFTP: nlist() on a non-existent directory resulted in error 2016-04-11 15:18:06 -05:00
terrafrost
6a97ddfa72 SSH/Agent: if comment is empty don't include it 2016-04-10 10:58:49 -05:00
Andreas Fischer
29659f877d Add bootstrap.php checking environment (MB_OVERLOAD_STRING). 2016-04-09 17:40:25 -05:00
terrafrost
ac97ce5d69 RSA: backport macdabby's changes 2016-04-03 21:34:11 -05:00
Abhishek Taneja
cb2ccea219 changing valid condition order, _slidingWindow biginteger 2016-03-19 12:11:59 -05:00
terrafrost
d74bfb73e4 RC2: getKeyLength didn't always return key length 2016-03-18 16:34:22 -05:00
terrafrost
123eee7150 RC4: key wasn't being truncated correctly 2016-03-18 12:00:41 -05:00
terrafrost
da36b5c91e RC2: fix issue with decrypting 2016-03-01 16:30:36 -06:00
terrafrost
1e93192721 Merge branch 'continuous-buffer-1.0' into 1.0 2016-02-19 15:14:12 -06:00
Joey3000
94b669d7ed Reorder array checks
Make sure that `if (isset($arr['__phpseclib_marker']))` is done on an array only.
2016-02-16 20:45:05 +01:00
Joey3000
062aa41ba0 Fixing Uncaught Error: Cannot use object of type test as array
Refs https://github.com/phpseclib/phpseclib/pull/934/files#r53035721
2016-02-16 19:41:41 +01:00
terrafrost
6eb35eb42c Random: a few more tweaks 2016-02-16 09:45:04 -06:00
Joey3000
047f2617f1 Circular reference handling improvement
Refs https://github.com/phpseclib/phpseclib/pull/934/files#r52838650

This does the following:

* Addresses the comments to 102d53bd27

* Fixes an "Allowed memory size of ... bytes exhausted" issue and simplifies the implementation, bringing it closer to the example in https://stackoverflow.com/questions/9042142/detecting-infinite-array-recursion-in-php/9293146#9293146
2016-02-14 13:40:58 +01:00
terrafrost
102d53bd27 Random: fix for issues with serialize() 2016-02-14 00:44:03 -06:00
terrafrost
bfd467532b Crypt/Base: fix continuous mode in CBC / decryption / OpenSSL 2016-02-06 08:59:05 -06:00
terrafrost
0905143fc1 SSH/Agent: fix possible PHP Warning 2016-01-13 16:51:12 -06:00
terrafrost
62fc4bbc88 Merge branch '1.0' of https://github.com/phpseclib/phpseclib into 1.0 2016-01-08 10:42:59 -06:00
terrafrost
7ad9eade2d BigInteger: fix issue with doing bitwise not on 0 2016-01-08 10:31:48 -06:00
terrafrost
1be0ac9f7f SFTP/Stream: fix issue with filenames with hash in them 2015-12-23 13:13:06 -06:00
terrafrost
57063f3604 SSH2: add isAuthenticated() method 2015-12-15 23:19:05 -06:00
terrafrost
786cecf309 Merge branch '1.0' into identifier-update-1.0 2015-12-14 11:07:42 -06:00
terrafrost
f17f1b2baf Merge branch '1.0' of https://github.com/phpseclib/phpseclib into small-tweaks-2 2015-12-11 13:44:39 -06:00
terrafrost
c655b16f75 BigInteger: add engine to __debugInfo output and add unit test 2015-12-07 15:22:53 -06:00
terrafrost
ee0f45fea6 update identifier to current version 2015-12-05 10:33:28 -06:00
splitice
77d5f8da20 Fix PHP invalid index warning 2015-11-24 09:13:30 +01:00
terrafrost
37535744b2 small tweaks 2015-11-21 22:55:20 -05:00
terrafrost
7339112e10 RSA: fix issue with loading PKCS8 specific keys 2015-11-09 22:53:50 -06:00
terrafrost
46bb95a265 X509: improve base64-encoded detection rules 2015-10-22 09:45:40 -05:00
Bob4ever
b67c690498 Fixed a bug in SFTP::chmod not using realpath on the filepath 2015-10-19 00:05:02 +02:00
terrafrost
5321b9b610 Merge branch 'phpdoc-1.0' into 1.0
Conflicts:
	phpseclib/Crypt/Base.php
	phpseclib/Crypt/DES.php
	phpseclib/Crypt/Rijndael.php
2015-10-13 08:52:52 -05:00
terrafrost
666092c889 Merge branch 'getkeylength' into 1.0 2015-10-12 22:59:46 -05:00
terrafrost
5f1ff099da Crypt/Base: one more cs update 2015-10-12 22:52:56 -05:00
terrafrost
2048a49aac use self:: in phpdoc comments to reduce merge conflicts 2015-10-11 12:22:07 -05:00
terrafrost
19229ed224 phpDoc changes 2015-10-05 13:22:51 -05:00
terrafrost
d91158f6ef rename key_size -> key_length 2015-10-04 21:06:17 -05:00
terrafrost
27034825f3 cs changes per bantu 2015-10-04 16:29:48 -05:00
terrafrost
6688f650f1 SFTP: don't start in local file middle when uploading to middle of
the remote file
2015-09-29 21:39:35 -05:00
terrafrost
e2a2ad8c91 SFTP: backport DavidAnderson684's changes to 1.0 branch 2015-09-27 10:56:05 -05:00
terrafrost
8691035228 Crypt/Base: add getBlockLength() method 2015-09-24 09:29:00 -05:00
terrafrost
bfba3db1a7 Crypt: make it so the key length can be explicitly set for all ciphers 2015-09-20 12:24:06 -05:00
terrafrost
833da775b6 BigInteger: fix PHP7 error
$x = gmp_init(6); empty($x); demonstrates the problem
2015-09-13 19:13:31 -05:00
Graham Campbell
010c1285ba Fixed another case 2015-09-06 23:05:41 +01:00
Graham Campbell
b1db7f05d9 Minor tweaks 2015-09-06 23:01:03 +01:00
Graham Campbell
06a1d3d981 Fixed error 2015-09-06 22:19:34 +01:00
Graham Campbell
eec8c9cb5d More fixes 2015-09-06 12:39:14 +01:00
Graham Campbell
dd031a1702 PHPDoc fixes 2015-09-06 12:28:08 +01:00
Marc Delisle
01e7c65f07 Typo in variable name 2015-09-05 12:13:11 -04:00
Andreas Fischer
e08e2fd300 Merge pull request #791 from cweagans/switch-to-extension-loaded-1.0
Switch to extension loaded (1.0)

* cweagans/switch-to-extension-loaded-1.0:
  Remove unnecessary parens
  Convert most instances of function_exists() to extension_loaded() where applicable
2015-09-04 15:04:17 +02:00
Cameron Eagans
8206061a30 Remove unnecessary parens 2015-09-02 15:22:37 -04:00
Andreas Fischer
e1bd0dfaf5 Merge pull request #801 from GrahamForks/1.0-phpdoc
[1.0] PHPDoc Fixes

* GrahamForks/1.0-phpdoc:
  Fixed lots of phpdoc typos
  Fixed invalid param phpdoc
2015-09-02 20:43:38 +02:00
Graham Campbell
cd0e10cf9d Fixed lots of phpdoc typos 2015-09-02 00:37:54 +01:00
Graham Campbell
5890f3da98 Fixed invalid param phpdoc 2015-09-02 00:22:30 +01:00
Cameron Eagans
2b75c37cc9 Convert most instances of function_exists() to extension_loaded() where applicable 2015-09-01 14:32:22 -04:00
terrafrost
abbee318cc X509: updates to getOID() as suggested by bantu 2015-08-31 15:20:38 -05:00
terrafrost
d7d9d782b0 X509: add getOID() method 2015-08-29 22:15:04 -05:00
terrafrost
15c9f99721 RSA: fix regression for PSS signatures 2015-08-11 07:27:56 -05:00
Andreas Fischer
65010d08e6 Add encryption_algorithm_to_key_size method. 2015-07-24 12:31:50 +02:00
Andreas Fischer
06ec04e3fe Merge pull request #746 from terrafrost/ssh-custom-socket-1.0
SSH2: make it so you can connect using open sockets / 1.0 branch

* terrafrost/ssh-custom-socket-1.0:
  SSH2: move where $host is defined
  SSH2: make it so you can connect using open sockets
2015-07-21 12:53:24 +02:00
Andreas Fischer
1473da35e6 SSH2: Introduce _array_intersect_first function.
+ No more empty for-loop bodies
+ No more counting variables $i leaked into outer context
+ No more unintuitive $i == count(...) comparisons
+ No more array / hash table access of the form $kex_algorithms[$i]
- Function call overhead; not in the performance critical path, though.
2015-07-17 22:28:32 +02:00
terrafrost
a19e2a0d21 SSH2: move where $host is defined 2015-07-17 13:08:24 -05:00
terrafrost
33a97391bc SSH2: make it so you can connect using open sockets 2015-07-17 12:30:44 -05:00
Andreas Fischer
847082ac74 Fix indentation phpcbf did not fix. 2015-07-17 12:57:41 +02:00
Andreas Fischer
5eb205b237 Remove PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket exception. 2015-07-17 12:57:41 +02:00
Andreas Fischer
2013a31ecd Use phpcbf to fix PHP code to ruleset. 2015-07-17 12:57:41 +02:00
Andreas Fischer
6c76df46d4 Ignore coding guidelines in ANSI switch block. 2015-07-17 12:57:05 +02:00
terrafrost
862b63e9e5 SFTP: stat cache updates 2015-07-17 12:34:56 +02:00
Andreas Fischer
12ccc402b1 Merge pull request #740 from terrafrost/x509-serialnumber-1.0
X509: use a random serial number for 1.0 branch

* terrafrost/x509-serialnumber-1.0:
  X509: add a comment to explain the bitmask
  X509: move where Crypt/Random loading is done
  X509: use a random serial number
2015-07-17 12:30:53 +02:00
terrafrost
0d3a117608 X509: add a comment to explain the bitmask 2015-07-17 00:45:20 -05:00
terrafrost
693804e62a X509: move where Crypt/Random loading is done 2015-07-16 11:50:22 -05:00
terrafrost
374f8db2e3 X509: use a random serial number 2015-07-16 11:31:20 -05:00
terrafrost
4dc79b96ed SSH2: limit the size of data that expect() looks at 2015-07-14 19:05:52 -05:00
Andreas Fischer
cdda621903 Merge pull request #714 from bantu/diffie-hellman-group-exchange-sha256
Add support for RFC 4419: diffie-hellman-group-exchange-sha{1,256}

* bantu/diffie-hellman-group-exchange-sha256:
  Add support for RFC 4419: diffie-hellman-group-exchange-sha{1,256}
2015-07-08 15:43:46 +02:00
Andreas Fischer
abeda5237f Add support for RFC 4419: diffie-hellman-group-exchange-sha{1,256} 2015-07-08 00:00:40 +02:00
Andreas Fischer
7f1dfba50d Merge pull request #730 from terrafrost/disable-stat-cache-1.0
SFTP: don't update stat cache when it's been disabled

* terrafrost/disable-stat-cache-1.0:
  SFTP: don't update stat cache when it's been disabled
2015-07-06 23:48:28 +02:00
Andreas Fischer
643103449c Merge pull request #731 from terrafrost/sftp-recur-delete-stat-cache-1.0
SFTP: delete stat cache for recursive deletes / 1.0 branch

* terrafrost/sftp-recur-delete-stat-cache-1.0:
  SFTP: update how recursive delete's update stat cache
  Tests/SFTP: add unit test
2015-07-06 23:37:55 +02:00
terrafrost
c460e511a0 SFTP: update how recursive delete's update stat cache 2015-07-04 13:09:26 -05:00
terrafrost
109ae38e48 SFTP: don't update stat cache when it's been disabled 2015-07-04 12:19:35 -05:00
Andreas Fischer
727677d4e1 Merge pull request #713 from bantu/SFTPStreamTest
[1.0] Various fixes to fopen mode handling in SFTP Stream

* bantu/SFTPStreamTest:
  Explicitly set size to 0 when creating or truncating.
  mode[0] of 'c' is not supposed to truncate.
  Need to create the file when it does not exist and mode[0] is not 'r'.
  Add SFTPStreamTest::testFopenFcloseCreatesFile()
2015-07-04 14:28:06 +02:00
terrafrost
77c757d095 X509: set one more parameter to null 2015-06-29 22:10:18 -05:00
terrafrost
6c2798be90 X509: set another parameters field to null 2015-06-29 21:53:27 -05:00
terrafrost
46a3c0fbbb X509: set parameter field to null for RSA keys 2015-06-28 11:32:42 -05:00
Andreas Fischer
1ad66ad1ea Merge pull request #719 from terrafrost/lstat-fix-1.0
SFTP: update conditions under which cache for lstat / . is used for 1.0 branch

* terrafrost/lstat-fix-1.0:
  Tests/SFTP: $lstat->$stat
  Tests/SFTP: just check to see that stat / lstat return an array
  SFTP: update conditions under which cache for lstat / . is used
  Tests/SFTP: add test for stat's on .
2015-06-27 21:59:45 +02:00
terrafrost
d1d415618a SFTP: update conditions under which cache for lstat / . is used 2015-06-26 23:34:14 -05:00
Andreas Fischer
d71da6b02b Explicitly set size to 0 when creating or truncating. 2015-06-25 14:26:35 +02:00
Andreas Fischer
9e07fb704b mode[0] of 'c' is not supposed to truncate. 2015-06-25 14:24:58 +02:00
Andreas Fischer
f0957021a1 Need to create the file when it does not exist and mode[0] is not 'r'. 2015-06-25 14:24:18 +02:00
terrafrost
c0555581e7 SSH2: fix for window sizes > 2,147,483,648 2015-06-24 23:45:14 -05:00