Commit Graph

3355 Commits

Author SHA1 Message Date
terrafrost c160a020db Merge branch '3.0' 2023-08-28 08:51:17 -05:00
terrafrost aeac69b846 Merge branch '2.0' into 3.0 2023-08-28 08:51:10 -05:00
terrafrost bc62673fdd Merge branch '1.0' into 2.0 2023-08-28 08:51:02 -05:00
terrafrost 320c43a4a0 SFTP: fix issue with get() downloading to files / streams
the code that's being removed has its origins in 65193d9a25. in that commit the packet length is set outside of the while loop. this would continue to be the case until https://github.com/phpseclib/phpseclib/pull/945.
2023-08-28 08:47:30 -05:00
terrafrost 36441a68e9 Merge branch '3.0' 2023-08-27 23:12:02 -05:00
terrafrost fac92403d0 Bootstrap: fix for when opcache ext is enabled but opcache.enable=0 2023-08-27 23:11:25 -05:00
terrafrost 3f7e74e41e Merge branch '3.0' 2023-08-24 20:22:42 -05:00
terrafrost f7e80e44c9 Merge branch '2.0' into 3.0 2023-08-24 20:22:16 -05:00
terrafrost 278f8e5f5a Merge branch '1.0' into 2.0 2023-08-24 20:21:13 -05:00
terrafrost 0f23be3188 SFTP: fix SFTPv2 errors when logging errors 2023-08-24 20:20:47 -05:00
terrafrost 585e0e44f4 ASN1: fix string conversion code for 32-bit PHP installs 2023-08-24 20:20:11 -05:00
terrafrost fc746cddfe Merge branch '3.0' 2023-08-10 22:33:44 -05:00
terrafrost c5e9d51e51 CS adjustment 2023-08-10 22:33:35 -05:00
terrafrost 34c05b9dbf Merge branch '3.0' 2023-08-10 22:23:16 -05:00
terrafrost 0f9d6577ad Bootstrap: JIT on Windows breaks certain phpseclib operations 2023-08-10 22:15:59 -05:00
terrafrost 5babbd028c Merge branch '3.0' 2023-07-26 22:00:22 -05:00
terrafrost 25a06f0071 Math/PrimeField: fix for when garbage collection has wiped data 2023-07-26 21:34:39 -05:00
terrafrost a7cfd2440a Merge branch '3.0' 2023-07-25 20:37:18 -05:00
terrafrost f01892a9db BigInteger: use GMP if it's available 2023-07-25 20:32:42 -05:00
terrafrost 90dc3cf6cb Merge branch '3.0' 2023-07-19 19:33:44 -05:00
terrafrost 718503af33 Merge branch 'phpstan' into 3.0 2023-07-19 19:28:21 -05:00
terrafrost 749cacea58 Merge branch '3.0' 2023-07-09 09:53:26 -05:00
terrafrost 0740d58136 BigInteger: do PHP64 w/ OpenSSL before BCMath w/ OpenSSL 2023-07-09 08:51:55 -05:00
terrafrost 249d17f921 BigInteger: BCMath w/o OpenSSL should never be reached 2023-07-09 00:37:53 -05:00
terrafrost e7af70d1dd Merge branch '3.0' 2023-07-08 13:28:41 -05:00
terrafrost 37c6f5255c BigInteger: update engine preferences 2023-07-08 13:27:16 -05:00
terrafrost 6ee1f8c45b Merge branch '3.0' 2023-07-05 07:30:46 -05:00
terrafrost 4013d260e0 Merge branch '2.0' into 3.0 2023-07-05 07:30:39 -05:00
terrafrost d8eec980b7 Merge branch '1.0' into 2.0 2023-07-05 07:30:33 -05:00
Kevin Reniers 38a2a84da1 Add EOF test to SSH2::isConnected
This adds an additional test to SSH2::isConnected to make it more intuitive. Aside from testing against the internal state, it will also assert that there is an internal socket and that that socket has not reached EOF.
2023-07-05 07:29:54 -05:00
terrafrost fc4d9dd480 AsymmetricKey: phpstan tweak 2023-07-02 17:43:35 -05:00
terrafrost 5a02ce27ac CS adjustment 2023-07-02 12:45:16 -05:00
terrafrost a31fd00e5a Merge branch '3.0' 2023-07-02 12:33:20 -05:00
terrafrost 5a7569cd13 SSH2: attempt at fixing stream_select(): unable to select [4] 2023-07-02 12:32:01 -05:00
terrafrost 2d33d7b0dc Merge branch '3.0' 2023-07-02 11:56:58 -05:00
terrafrost 3334a3243c Merge branch '2.0' into 3.0 2023-07-02 11:55:51 -05:00
terrafrost 09f19cb92a Merge branch '1.0' into 2.0 2023-07-02 11:55:40 -05:00
terrafrost de09e8e817 SFTP: RESUME_START didn't work as described 2023-07-02 11:48:07 -05:00
terrafrost 65693db644 Merge branch '3.0' 2023-07-02 11:29:03 -05:00
terrafrost 9197b3ad3e ASN1: CS adjustment 2023-07-02 11:22:02 -05:00
terrafrost 9341e090c5 Merge branch '2.0' into 3.0 2023-07-02 11:18:17 -05:00
terrafrost 6aa6a5241f SFTP: CS adjustments 2023-07-02 10:46:34 -05:00
terrafrost 411d09cb7a Merge branch '1.0' into 2.0 2023-07-02 10:45:46 -05:00
terrafrost df3dab7d3f SFTP: make it so SFTP::RESUME also sets offset of local file 2023-07-02 10:45:25 -05:00
terrafrost 656a46ae12 Merge branch '3.0' 2023-06-25 10:03:23 -05:00
terrafrost bc8e0ed636 BigInteger: speed up powMod() method 2023-06-25 10:03:16 -05:00
terrafrost cbbadea6d1 Merge branch '1.0' into 2.0 2023-06-13 03:02:45 -05:00
terrafrost 16c67f4399 SSH2: fix more E_DEPRECATE_NOTICEs 2023-06-13 03:01:43 -05:00
terrafrost 68d8f5b4fe Merge branch '1.0' into 2.0 2023-06-12 17:15:30 -05:00
terrafrost b6c01f9318 SSH2: backport some E_DEPRECATED fixes from 3.0 2023-06-12 17:14:58 -05:00
terrafrost 6833fc79a6 Merge branch '3.0' 2023-06-04 16:39:59 -05:00
terrafrost 4f113bc96c SFTP: CS adjustment 2023-06-04 16:39:44 -05:00
terrafrost dff24146af CS adjustment 2023-06-04 16:33:58 -05:00
terrafrost 9f919e8f24 Merge branch '1.0' into 2.0 2023-06-04 16:16:25 -05:00
terrafrost eb8cbd7317 X509: backport EV subjects 2023-06-04 16:16:07 -05:00
terrafrost 9d2e353a04 Merge branch '3.0' 2023-06-04 16:08:09 -05:00
Tobias 3c349e122b feat(ADMINISTRATION-1): added ev subjects 2023-06-04 16:00:15 -05:00
terrafrost ff26e22563 CS adjustments 2023-06-04 11:26:34 -05:00
terrafrost 501c96c48c Merge branch '3.0' 2023-06-04 10:51:36 -05:00
terrafrost b8f8f0b7db SFTP: add optional $recursive parameter to filesize() 2023-06-04 10:50:26 -05:00
terrafrost e6dd9f6492 Merge branch '3.0' 2023-06-02 10:25:13 -05:00
terrafrost f418be845b RSA: setting sig padding broke enc padding and vice versa 2023-06-02 10:14:58 -05:00
terrafrost d856416026 Merge branch '3.0' 2023-05-27 19:30:15 -05:00
Léon Melis 841267aafa X509::getChain() should always return array of X509 objects
Due to an early exit optimization, X509::getChain() could return currentCert as an array, instead of X509
2023-05-27 19:15:15 -05:00
terrafrost 1b1c073d1e Merge branch '3.0' 2023-05-18 08:24:02 -05:00
thomascorthals c71c217fd5 SFTP typehint fixes 2023-05-15 11:15:49 +02:00
terrafrost 8d0c1a10c7
Merge pull request #1905 from terrafrost/master-openchannel
(master branch) SSH/SFTP: create new openChannel() method to eliminate dupe code
2023-05-10 04:39:06 -05:00
terrafrost b25206e92b
Merge pull request #1904 from terrafrost/3.0-openchannel
(3.0 branch) SSH/SFTP: create new openChannel() method to eliminate dupe code
2023-05-10 04:38:51 -05:00
terrafrost e6f86e1770 Merge branch '3.0-openchannel' into master-openchannel 2023-05-07 11:35:24 -05:00
terrafrost 3dd7779939 SSH2: rm redundant isAuthenticated() call 2023-05-07 11:24:33 -05:00
terrafrost 89d8e6ecbb SFTP: rm redundant code 2023-05-07 11:07:38 -05:00
terrafrost f664ccb521 SSH2: make exceptions more useful for read() / write() 2023-05-07 11:07:07 -05:00
terrafrost 128d5496b5 Merge branch '3.0' 2023-05-05 07:38:24 -05:00
terrafrost 961034f4c2 SymmetricKey: fix typehint 2023-05-05 07:36:29 -05:00
terrafrost 928b5870b2 Merge branch '3.0' 2023-04-21 15:39:47 -05:00
terrafrost 79b6f96870 SSH2: CS adjustment 2023-04-21 15:39:01 -05:00
Andrew Brown d4263e854d update exception message
`fputs()` can return `int|false`.  if it fails and `$sent` is `false`, then our exception message looks a little confusing:

> Only  of XXX bytes were sent

This change updates the message to be more descriptive if the `fputs()` fails.
2023-04-18 15:16:18 -05:00
terrafrost 52c85c9935 Merge branch '3.0-openchannel' into master-openchannel 2023-04-15 08:31:37 -05:00
terrafrost 184a984e97 SSH2: updates to openchannel refactoring 2023-04-14 18:01:20 -05:00
terrafrost 34feefef3d Merge branch '3.0' 2023-04-12 20:58:10 -05:00
terrafrost 8b67d0ac32 Merge branch '2.0' into 3.0 2023-04-12 20:56:23 -05:00
terrafrost d5d0fca7cf Merge branch '1.0' into 2.0 2023-04-12 20:49:21 -05:00
terrafrost 53f967c36e SFTP: fix NET_SFTP_ATTR_EXTENDED 2023-04-12 20:49:07 -05:00
terrafrost 7d4fa71e9c Merge branch '3.0' 2023-04-10 01:28:25 -05:00
terrafrost 55578577c5 Merge branch '3.0-openchannel' into master-openchannel 2023-03-30 20:52:26 -05:00
terrafrost 5fb084b04c SSH2: if the server doesn't support multiple channels error out 2023-03-29 04:05:41 -05:00
Vincent Langlet 39bc067417 Fix phpdoc 2023-03-28 09:54:46 +02:00
terrafrost cecabb1fea SSH/SFTP: create new openChannel() method to eliminate dupe code 2023-03-27 17:46:46 -05:00
terrafrost b799abd1a0 SSH/SFTP: make message numbers / packet types static as well 2023-03-23 13:04:07 -05:00
terrafrost 9705cbbc26 SSH/SFTP: make define_array static 2023-03-23 12:23:43 -05:00
Robert 53fe071bd2 Merge branch '3.0' 2023-03-16 11:01:21 -05:00
Robert 7ec36fb5d5 Exposed publically open shell method as well as methods to query interactive channel open statuses.
Removed in_request_pty_exec and in_subsystem flags, and removed uses of MASK_SHELL in bitmap, replacing with open channel status queries.
Adding channel argument to read, write, and reset allowing callers to select among multiple open interactive channels.
Adding interactive channel identifier interface as sanctioned path for users to obtain channels ids instead of using channel constants.
Deprecating get_interactive_channel helper and documenting its "legacy" behavior in read, write, and reset doc blocks.
Removing disconnect on timeout in channel close for lack of clarity around timeout origin.
Check for open channel prior to closing in stopSubsystem and reset.
2023-03-16 10:18:03 -05:00
terrafrost 5761a0ba46 Merge branch '3.0' 2023-03-14 21:44:41 -05:00
Steven Hetland abbc1ab7c7 ASN1: 3.0 decodeBER() was optimized to remove duplicate work.
decodeBER() now runs twice as fast.
2023-03-14 21:43:29 -05:00
terrafrost e9596cef8c Merge branch '3.0' 2023-03-05 10:11:53 -06:00
terrafrost 0f6e1c2218 PKCS8: fix public private checks for human readable keys 2023-03-05 10:01:22 -06:00
terrafrost 7ce104b12c Merge branch '1.0' into 2.0 2023-03-05 04:18:37 -06:00
terrafrost 34d00869e5 SSH2: backport getTimeout() 2023-03-05 04:07:26 -06:00
terrafrost 79dead6a5e CS adjustments 2023-03-05 00:09:02 -06:00
terrafrost 60358cefb1 Merge branch '3.0' 2023-03-04 23:31:30 -06:00
terrafrost cf69b29427 Crypt/PKCS8: rm duplicate code and improve detection of public keys 2023-03-04 23:25:36 -06:00
terrafrost 9a356ba200 Merge branch 'rposky' 2023-03-04 21:00:14 -06:00
terrafrost 71b9b64203 CS adjustments 2023-03-04 20:47:49 -06:00
terrafrost ea0a2375d2 Merge branch '3.0' 2023-03-03 14:55:02 -06:00
Simon Podlipsky 530f8ab210 feat: add return types to few jsonSerialize() 2023-03-03 14:54:56 -06:00
terrafrost f8d2ff5ae4 CS adjustments 2023-03-03 14:42:42 -06:00
terrafrost a8e90331c1 Merge branch '3.0' 2023-03-03 14:23:11 -06:00
Simon Podlipsky c053b895c8 style: add newline at end of BigInteger.php file 2023-03-03 14:23:02 -06:00
terrafrost c918d60b20 SymmetricKey: rm safe_intval 2023-03-03 14:06:25 -06:00
terrafrost f519a54e7a Merge branch '3.0' 2023-03-03 12:54:14 -06:00
terrafrost fbe79b0855 Merge branch '2.0' into 3.0 2023-03-03 09:30:48 -06:00
terrafrost 0af70c5de6 Merge branch '1.0' into 2.0 2023-03-03 09:25:24 -06:00
terrafrost 9e758c180d Blowfish: 32-bit PHP tweaks 2023-03-03 09:24:42 -06:00
terrafrost 922cfd8dea Merge branch '3.0' 2023-03-02 04:52:55 -06:00
Simon Podlipsky b946c6eed9 style: run csfixer 2023-03-02 04:52:25 -06:00
terrafrost e77c881b54 Merge branch '3.0' 2023-03-02 03:49:40 -06:00
terrafrost 6298d1cd55 PrimeField: prevent infinite loop with composite primefields 2023-03-02 03:25:08 -06:00
Robert d012d6cd03 Adding getter for timeout to SSH2 2023-02-28 12:52:01 -06:00
terrafrost 1b1e729632 backport enhancements from the 2.0 branch 2023-02-11 22:20:03 -06:00
terrafrost 5d51328dd5 Merge branch '3.0' 2023-02-11 20:57:49 -06:00
terrafrost d3e72bd1fc Merge branch '2.0-github-actions' into 3.0 2023-02-11 20:40:52 -06:00
terrafrost e42185c672 BigInteger: fix for hex numbers with new lines in them 2023-02-11 19:08:08 -06:00
terrafrost e3b9a97200 Blowfish: fix issues on 32-bit PHP installs 2023-02-11 17:47:40 -06:00
terrafrost 50ab21b7cb Crypt: don't do OpenSSL version check unless OpenSSL is installed 2023-02-11 14:55:25 -06:00
terrafrost ad7a7d5c8f fix PHP <5.4 compatability 2023-02-10 12:34:11 -06:00
terrafrost ca2c9588ea Merge branch '3.0' 2023-02-05 23:47:08 -06:00
terrafrost 2487192558 AsymmetricKey: error out on unsupported operations 2023-02-05 17:44:51 -06:00
terrafrost 00f5057e1b Merge branch '3.0' 2023-01-06 14:57:48 -06:00
Kevin van Hulst 3ad3693d31 fix "Creating default object from empty value" error 2023-01-06 14:57:05 -06:00
terrafrost aa68ee7e69 Merge branch '1.0' into 2.0 2022-12-23 10:16:52 -06:00
Alexander Vlasov 797351cd63 Fix undefined properties deprecated in PHP 8.2 2022-12-23 10:08:51 -06:00
terrafrost 974a30d4d9 fix bad merge 2022-12-17 11:48:28 -06:00
terrafrost 5335dbde3e Merge branch '2.0' into 3.0 2022-12-17 11:25:26 -06:00
Simon Podlipsky 97ea650dba fix: drop use of "self" in callable as it's deprecated since php 8.2 2022-12-17 08:49:29 -06:00
terrafrost 649b4f1713 Merge branch '3.0' 2022-12-16 22:54:07 -06:00
terrafrost 90a1765106 Merge branch '2.0' into 3.0 2022-12-16 22:53:49 -06:00
terrafrost be361b6722 Merge branch '1.0' into 2.0 2022-12-16 22:30:32 -06:00
terrafrost c99e38b7c9 OpenSSL 3.0.1+ deprecated some algorithms 2022-12-16 22:16:49 -06:00
terrafrost d02d77ad56 Merge branch '3.0' 2022-12-11 09:01:36 -06:00
terrafrost 1a201dd131 Merge branch '2.0' into 3.0 2022-12-11 08:59:36 -06:00
terrafrost 6611c0b566 Merge branch '1.0' into 2.0 2022-12-11 07:30:01 -06:00
terrafrost 1c56e00cf8 SSH2: if logging in with rsa-sha2-256/512 fails, try ssh-rsa 2022-12-11 07:29:44 -06:00
terrafrost 762e786ec9 SymmetricKey: more CS updates 2022-12-07 08:39:01 -06:00
terrafrost e1541eb109 Merge branch '3.0' 2022-12-07 08:38:28 -06:00
terrafrost 8568af7f9b SymmetricKey: CS updates 2022-12-07 08:38:06 -06:00
terrafrost d186a9d20d Merge branch '2.0' into 3.0 2022-12-07 08:37:25 -06:00
terrafrost e8ff5142c8 Merge branch '1.0' into 2.0 2022-12-07 08:33:13 -06:00
terrafrost 16df002325 Crypt/Base: add a function to check continuous buffer status 2022-12-07 08:32:44 -06:00
terrafrost 0c728ff2bc SSH/Agent: add proper type hinting to constructor 2022-11-29 06:31:29 -06:00
terrafrost efd5bf281a SSH/Agent: use PHP8's new str_contains function 2022-11-29 06:24:32 -06:00
terrafrost 68aa48de66 X509: CS adjustment 2022-11-29 06:09:31 -06:00
terrafrost 637444d0ab Merge branch '3.0' 2022-11-29 05:48:31 -06:00
terrafrost 6ee646a480 Merge branch '2.0' into 3.0 2022-11-29 05:47:40 -06:00
terrafrost 218c7e5207 SSH/Agent: add support for named pipes on windows (for pageant) 2022-11-29 05:41:57 -06:00
terrafrost 8907a4bd5b Merge branch '1.0' into 2.0 2022-11-28 08:43:32 -06:00
terrafrost 68c3eef88f SCP: do $var === false vs !$var 2022-11-28 08:42:55 -06:00
terrafrost b216a4cf07 ASN1: 3.0 already has $location defined 2022-11-27 22:47:20 -06:00
terrafrost d979777a60 Merge branch '2.0' into 3.0 2022-11-27 22:45:55 -06:00
terrafrost 4c7cce54c3 Merge branch '1.0' into 2.0 2022-11-27 21:37:15 -06:00
Côme Chilliet 74ee25bf8a Fix PHP 8.2 dynamic property warning 2022-11-27 21:37:05 -06:00
terrafrost 5afc5f77b9 Merge branch '3.0' 2022-11-27 12:18:17 -06:00
terrafrost bf804e6feb DSA/PuTTY: ssh-dsa should be ssh-dss 2022-11-27 12:18:09 -06:00
terrafrost ad11cf3c6b Merge branch '3.0' 2022-10-27 23:07:45 -05:00
terrafrost 08c27ae48a Merge branch '2.0' into 3.0 2022-10-27 23:07:38 -05:00
terrafrost 104f776cff Merge branch '1.0' into 2.0 2022-10-27 23:07:06 -05:00
Lars Moelleken a482c925af typo: "cann't" vs "can't" 2022-10-27 23:06:53 -05:00
Jack Worman 7b557d46c5 Remove bootstrap.php 2022-10-20 17:57:21 -05:00
Jack Worman fe4bdc0410 Property_typehint_in_ssh2 2022-10-07 08:39:21 -05:00
terrafrost 0a50932285 SFTP: CS adjustments 2022-10-04 21:32:14 -05:00
terrafrost b2ca37b990 Merge branch '3.0' 2022-10-04 21:31:51 -05:00
terrafrost a10a3b8e5b Merge branch '2.0' into 3.0 2022-10-04 21:02:49 -05:00
terrafrost 2ed74533f4 Merge branch '1.0' into 2.0 2022-10-04 18:11:49 -05:00
Phil Davis 24845ccbcc delete of non-existent folder returns true when it used to ret 2022-10-04 17:56:23 -05:00
Jack Worman 985b3c4f7c Throw \phpseclib3\Exception\ExceptionInterface exceptions 2022-09-26 07:41:32 -05:00
terrafrost 2b937b413a Merge branch '2.0' 2022-09-23 23:17:54 -05:00
terrafrost 4f53331c98 SSH2: rm if condition that can't ever be true in 3.0+ 2022-09-23 23:03:11 -05:00
terrafrost c1f284d6b8 Merge branch '3.0' 2022-09-23 22:43:52 -05:00
terrafrost f0a146eaa1 X509: make it so PKCS1 X509 certs can create PSS sigs 2022-09-23 22:33:30 -05:00
terrafrost 8c53a80405 Merge branch '3.0' 2022-09-23 16:15:43 -05:00
terrafrost b54eeb8e35 X509: make it so CRLs, CSRs and SPKACs can support PSS keys 2022-09-23 15:03:37 -05:00
terrafrost c1377159a2 Random: don't do >= 8.1 check 2022-09-15 00:01:15 -05:00
terrafrost 5a6f433ee8 Merge branch '3.0' 2022-09-15 00:00:23 -05:00
terrafrost a1862b1817 fix bad merge 2022-09-15 00:00:14 -05:00
terrafrost 535fa6c777 Merge branch '3.0' 2022-09-14 23:47:17 -05:00
terrafrost ead5790c80 CS adjustment 2022-09-14 23:45:04 -05:00
terrafrost 65493ae3be Merge branch '2.0' into 3.0 2022-09-14 12:50:32 -05:00
terrafrost 73b149ea6d Merge branch '1.0' into 2.0 2022-09-13 23:59:59 -05:00
terrafrost c4ec1ea069 Random: fix fallback on PHP 8.1+ 2022-09-13 23:58:14 -05:00
terrafrost 51cafda4a3 make PHP 8.1 32-bit changes compatable with raspberry pi's 2022-09-13 23:56:13 -05:00
Jeremy Albert 2ab212300e Avoid implicit conversion from float to int 2022-09-13 12:53:20 -05:00
terrafrost 10fe792938 Merge branch '3.0' 2022-09-05 12:51:44 -05:00
terrafrost 59e34b1cd3 SSH2: fix type hinting for keyboard_interactive_helper 2022-09-05 12:50:38 -05:00
terrafrost 8dbb8667f1 fix bad merge 2022-08-28 11:03:15 -05:00
terrafrost 88fbf6ab97 Merge branch '1.0' into 2.0 2022-08-28 10:34:26 -05:00
terrafrost 1168ba4d27 backport 3.0's PHP 8.1 32-bit fixes 2022-08-28 09:54:08 -05:00
terrafrost 26b2b3f473 CS adjustment 2022-08-27 08:34:15 -05:00
terrafrost 41dbac7a9e Merge branch '3.0' 2022-08-27 08:33:39 -05:00
terrafrost 2026b0c0db Hash: fix PHP 8.2 error
see https://github.com/php/php-src/issues/8924
2022-08-27 08:33:17 -05:00
terrafrost e2a20a6ad9 fix bad merge 2022-08-27 07:33:21 -05:00
terrafrost 2f3555a9b4 Merge branch '3.0' 2022-08-27 06:16:19 -05:00