Commit Graph

4833 Commits

Author SHA1 Message Date
terrafrost
a3ef82e281 PKCS8: make it so keys can be saved as PEMs or DERs 2024-09-25 21:54:55 -05:00
terrafrost
fb3aa8d8ab Merge branch '2.0' into 3.0 2024-09-25 18:03:15 -05:00
terrafrost
be7ecd3456 Merge branch '1.0' into 2.0 2024-09-25 18:03:06 -05:00
terrafrost
9f1602e64c CHANGELOG: add entries for 0.2.1, 0.2.0, 0.1.5 and 0.1.1
using release notes from https://web.archive.org/web/20101215043248/http://freshmeat.net/projects/phpseclib
2024-09-25 18:01:31 -05:00
terrafrost
826b4cb582 don't run unit tests on PHP 5.6
phpseclib 3.0 still nominally supports PHP 5.6 but i'm tired of seeing
unit tests fail because of issues i can't reproduce on my own local
PHP 5.6 install.

this isn't without precident.phpseclib 1.0 nominally supports PHP 4.4,
as well, but it's not unit tested on PHP 4.4. for that one, if someone
has an issue with PHP 4.4 they're free to report it on github. PHP 5.6
will henceforth work that way for phpseclib 3.0.
2024-09-24 22:21:02 -05:00
terrafrost
c3cd458bcf BigInteger: speed up Barrett reductions
the changes for #1994 (commit 2689c727) slowed things down
unnecessarily.
2024-09-24 06:37:52 -05:00
terrafrost
db92f1b198 CHANGELOG: add 3.0.42 release 2024-09-15 22:06:04 -05:00
terrafrost
1dba4262e9 X509: CRL default version should be v1 - not v2 2024-09-15 21:45:40 -05:00
terrafrost
d84925124d Merge branch '2.0' into 3.0 2024-09-15 21:43:31 -05:00
terrafrost
567a439152 Merge branch '1.0' into 2.0 2024-09-15 21:43:24 -05:00
terrafrost
f23b6d583b X509: CRL fixes 2024-09-15 21:43:11 -05:00
terrafrost
c8da4c50d5 SFTP: refactor posix_rename() somewhat 2024-09-15 14:03:35 -05:00
terrafrost
89f2385a6a CS adjustment 2024-09-15 13:40:16 -05:00
terrafrost
79ab7c1f8e SFTP: make posix_rename work on SFTP v5+ 2024-09-15 13:33:51 -05:00
terrafrost
5ec2d25ed4 SSH2: update error message for ppl not connecting to SSH servers 2024-09-13 08:41:54 -05:00
terrafrost
a5316b71f5 Hash: simplify sha512 code 2024-09-08 07:58:18 -05:00
terrafrost
28866e826b Hash: fix for masks at upper boundary of what signed ints allow
on 64-bit PHP installs (1 << 63) - 1 == (1 << 63)

-1 ^ (-1 << 63) gives the correct result

on 32-bit PHP installs (1 << 31) - 1 returns a float and using the result as a bitmask yields this error on sufficiently new versions of PHP:

Deprecated: Implicit conversion from float -2147483649 to int loses precision

Explicitly casting (1 << 31) - 1 to an int yields the correct result but, then again, so does -1 ^ (-1 << 31) and that one is consistent with how it works on 64-bit PHP installs
2024-09-08 07:18:47 -05:00
terrafrost
8307eb3b01 CS adjustment 2024-09-07 19:17:38 -05:00
terrafrost
614bd994b9 Hash: significantly speed up sha512/224 & sha512/256
at least on 64-bit PHP < 7.1 installs

previously hashing 0.5MB of data with sha512/224 would take 48.5s.
now it takes 0.72s.
2024-09-06 17:56:21 -05:00
terrafrost
301ef6bd18 Merge branch '2.0' into 3.0 2024-09-04 21:28:07 -05:00
terrafrost
a5a3aaa3d4 Merge branch '1.0' into 2.0 2024-09-04 21:25:34 -05:00
terrafrost
3e8ce2ba4b SSH2: if string is passed to setPreferredAlgorithms treat as array 2024-09-04 21:25:09 -05:00
terrafrost
e08decd0fe Hash: significantly speedup umac algorithms on 32-bit PHP installs
and cleanup the 64-bit algorithms
2024-08-27 21:31:15 -05:00
terrafrost
ce0aeec402 SFTP: backport statvfs() and posix_rename() from master branch 2024-08-25 20:10:38 -05:00
terrafrost
b500726ce8 Hash: rm unnecessary casting to int 2024-08-25 18:15:18 -05:00
terrafrost
70416554a4 Merge branch '2.0' into 3.0 2024-08-25 14:11:04 -05:00
terrafrost
778035aa71 SSH2: identification strings > 255 bytes didnt get parsed correctly 2024-08-25 14:08:42 -05:00
terrafrost
7e699fb725 Hash: significantly speedup umac algorithms on 64-bit PHP installs
the same technique should be able to be used to speed up SHA512
on PHP < 7.1.0. PHP >= 7.1.0 doesn't benefit from the change
as there's no need for any pure PHP SHA512 implementation on those
versions
2024-08-25 05:30:29 -05:00
terrafrost
e13a2628c5 Hash: umac's require a key; give a better error when one is missing 2024-08-22 08:47:36 -05:00
terrafrost
6897b947ea SSH2: priotize the umac algorithms down due to their slow speed
PHP's hash() method doesn't support them so they receive no
acceleration whereas the other algorithms can and do
2024-08-20 08:38:38 -05:00
terrafrost
dd2d8665f9
Merge pull request #2031 from rposky/ssh-disconnect-loop
Prevent loops during disconnect
2024-08-19 06:06:49 -05:00
terrafrost
d5931858b6 CHANGELOG: IEEEE -> IEEE 2024-08-16 08:01:09 -05:00
terrafrost
94bd3ad078 SSH2: CS adjustments 2024-08-15 23:38:47 -05:00
terrafrost
e2488749ae SFTP: add getSupportedExtensions() method 2024-08-15 23:32:10 -05:00
terrafrost
25761222fe SSH2: enhance logging
log the time it took for fsockopen to connect and the time it took
for the SSH identification strings to be sent
2024-08-15 08:55:05 -05:00
Robert
c82594e222 Add DISCONNECT bitmap mask and use to prevent looping potential while disconnecting. Do not attempt disconnect packet send on closed socket. 2024-08-14 10:32:36 -04:00
terrafrost
621c73f7dc CHANGELOG: add 3.0.41 release 2024-08-11 19:13:54 -05:00
terrafrost
9e399cf21a
Merge pull request #2027 from buismaarten/3.0
Fix deprecation warning
2024-08-11 19:11:45 -05:00
Maarten Buis
fb3d6bd713
Fix deprecation warning 2024-08-11 23:17:31 +02:00
terrafrost
3dd2561d14 add 3.0.40 release 2024-08-11 11:34:00 -05:00
terrafrost
36d2092a81 BigInteger/BCMath engine's bitwise_or() was doing XOR 2024-08-11 11:02:56 -05:00
terrafrost
67f87dd1e2 Tests/BigInteger: update bitwise_OR test 2024-08-11 10:47:47 -05:00
terrafrost
05f45f0337 Merge branch '2.0' into 3.0 2024-08-10 20:00:48 -05:00
terrafrost
43af71e538 Merge branch '1.0' into 2.0 2024-08-10 19:59:45 -05:00
terrafrost
90eb0220af SSH2: fix possible infinite loop on packet timeout
get_channel_packet() could call close_channel() which would call
get_channel_packet(), again, repeat ad nauseam
2024-08-10 19:55:03 -05:00
terrafrost
47895e2851
Merge pull request #2023 from rposky/ssh-default-socket-timeout
SSH2: Defer to default socket timeout in absence of more specific value
2024-08-05 10:59:09 -05:00
terrafrost
42ecb34430 CS adjustments 2024-08-03 11:47:18 -05:00
terrafrost
10075ea57e SSH/Agent: make it so identities include key comments and add new
findIdentityByPublicKey() method
2024-08-03 09:47:18 -05:00
terrafrost
45b98d8cb3 fix IEEE length calculations
secp521r1 has length of 521 so we want 66 to cover that last extra bit
- not 65
2024-08-02 09:04:47 -05:00
Robert
b94d55a734 Use the default socket timeout in absence of more specific user-defined value 2024-08-01 12:14:33 -04:00