1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-12-04 02:27:52 +01:00
Commit Graph

756 Commits

Author SHA1 Message Date
terrafrost
38502615d3 Merge remote-tracking branch 'michael/fix_cert_time_encoding' into php5 2014-03-29 15:28:39 -05:00
Michael Braun
457f8fbb99 fix certificate date encoding
RFC 3280 requires in section
 - 4.1.2.5 Validity
 - 5.1.2.4 This Update
 - 5.1.2.5 Next Update
 - 5.1.2.6 Revoked Certificates
that dates are to be encoded as utcTime iff they are before 2050 and
as generalTime otherwise.

Currently, phpseclib does not respect this by always choosing generalTime.
Further, the format used interally to represent dates only keeps two digits,
so dates in 2050 and later cannot be represented in this format.

This patch fixes this by
 1. changing the interal format to be capable of unambiguously representing
    dates in 2050 or later (i.e. use four digits to represent the year),
 2. choosing between utcTime and generalTime accordingly.

Without this patch, openssl_x509_parse complains:
 Warning: openssl_x509_parse(): illegal ASN1 data type for timestamp
2014-03-28 15:02:50 +01:00
Andreas Fischer
483b8a7d3c Merge branch 'master' into php5
* master:
  fix more ssh channel issues
2014-03-21 18:27:13 +01:00
terrafrost
7a2c7a414c fix more ssh channel issues
In logs that were provided to me phpseclib sent a packet that was 2536 bytes long (excluding the bytes denoting the channel and data length) but the length packet said it was 32764 bytes long (ie. $max_size).

So when $max_size is less than the data being sent and has to be adjusted by a new window adjust message from the server and the adjustment makes $max_Size bigger than the data being sent over problems arise.

SSH's window size has caused issues before. Overall I don't think the SSH specs really explain the window size very well. I opened up an errata on SSH's RFC a while back about the issue.
2014-03-21 02:53:43 -05:00
Andreas Fischer
aecf89c031 Merge branch 'master' into php5
* master:
  Drop meaningless, outdated, inconsistent version tags in doc blocks.
2014-03-13 00:03:38 +01:00
Andreas Fischer
fb1296bbec Drop meaningless, outdated, inconsistent version tags in doc blocks.
find phpseclib -type f -name "*.php" -exec sed -i '/@version/d' {} \;
2014-03-11 15:58:33 +01:00
Andreas Fischer
cb56e676dc Merge branch 'master' into php5
* master:
  Tests for bug280.
  Also replace this with call_user_func
  Use call_user_func, as this will work on PHP < 5.4, whereas $callback() does not
2014-03-06 12:05:17 +01:00
Andreas Fischer
aa64ddfd4d Merge pull request #280 from nickygerritsen/master
Use call_user_func, as this will work on PHP < 5.4, whereas $callback() does not

* nickygerritsen/master:
  Also replace this with call_user_func
  Use call_user_func, as this will work on PHP < 5.4, whereas $callback() does not
2014-03-06 12:01:14 +01:00
Andreas Fischer
e4d0906cee Merge branch 'master' into php5
* master:
  typofixes - https://github.com/vlajos/misspell_fixer
2014-03-06 10:46:26 +01:00
Veres Lajos
930a3fb4d2 typofixes - https://github.com/vlajos/misspell_fixer 2014-03-05 23:41:20 +00:00
Nicky Gerritsen
b5e579f6c0 Also replace this with call_user_func 2014-03-05 18:38:33 +01:00
Nicky Gerritsen
97d1e75a51 Use call_user_func, as this will work on PHP < 5.4, whereas $callback() does not 2014-03-05 15:44:17 +01:00
Andreas Fischer
201b55866e Merge branch 'master' into php5
* master:
  Remove HTML from BigInteger code example.
2014-03-01 01:40:53 +01:00
Andreas Fischer
c1597f4533 Remove HTML from BigInteger code example. 2014-03-01 01:40:28 +01:00
Andreas Fischer
907f062096 Merge branch 'master' into php5
* master:
  Set permissions of phpseclib/Crypt/RC2.php to 644.
2014-03-01 00:57:05 +01:00
Andreas Fischer
f744fbbcc9 Set permissions of phpseclib/Crypt/RC2.php to 644. 2014-03-01 00:56:08 +01:00
Andreas Fischer
2785826d94 Merge branch 'master' into php5
* master:
  composer: add System to psr-0 autoload section
  update README.md to show latest version
  SSH_Agent: a few changes per bantu
2014-02-28 23:17:46 +01:00
terrafrost
b3a1f52bff SSH_Agent: a few changes per bantu 2014-02-21 23:15:24 -06:00
Andreas Fischer
88e6eef90f Merge branch 'master' into php5
* master:
  Add newline at EOF to phpseclib/System/SSH_Agent.php.
  SSH_Agent: phpdoc updates
  SSH_Agent: misc updates
  SSH2: add ssh-agent support
2014-02-21 19:42:36 +01:00
Andreas Fischer
e08c7244e2 Add newline at EOF to phpseclib/System/SSH_Agent.php. 2014-02-21 19:22:09 +01:00
Andreas Fischer
053a9ac9af Merge pull request #265 from terrafrost/ssh-agent
SSH2: add ssh-agent support

* terrafrost/ssh-agent:
  SSH_Agent: phpdoc updates
  SSH_Agent: misc updates
  SSH2: add ssh-agent support
2014-02-21 19:17:51 +01:00
terrafrost
b4b93b80f5 SSH_Agent: phpdoc updates 2014-02-20 13:38:07 -06:00
terrafrost
405ff3f7b4 SSH_Agent: misc updates 2014-02-19 10:13:54 -06:00
Andreas Fischer
51d30ed66f Merge branch 'master' into php5
* master:
  CS: Each file MUST end with exactly one newline character
2014-02-11 01:00:52 +01:00
Andreas Fischer
56f1ada5c1 CS: Each file MUST end with exactly one newline character 2014-02-10 14:51:35 +01:00
terrafrost
e90648c7a5 SSH2: add ssh-agent support 2014-02-10 00:04:16 -06:00
Andreas Fischer
addd2ac320 Merge branch 'master' into php5
* master:
  SSH2: ignore exit_status channel requests
2014-02-03 16:56:46 +01:00
Andreas Fischer
f4dbcb1b78 Merge pull request #264 from terrafrost/exit-status
SSH2: ignore exit_status channel requests

* terrafrost/exit-status:
  SSH2: ignore exit_status channel requests
2014-02-03 16:56:36 +01:00
terrafrost
cd9801db8a SSH2: ignore exit_status channel requests
Fixes #258
2014-02-02 23:42:06 -06:00
Andreas Fischer
0c4cc0bd0e Merge branch 'master' into php5
* master:
  Cleaned up whitespace

Conflicts:
	composer.json
2014-01-18 18:58:55 +01:00
Graham Campbell
1c2796e3eb Cleaned up whitespace 2014-01-18 17:29:25 +00:00
terrafrost
777db22709 Merge branch 'php5' of https://github.com/phpseclib/phpseclib into php5 2013-12-28 13:56:27 -06:00
terrafrost
05077cf0f3 Merge branch 'ssh2-identifier' into php5 2013-12-28 13:50:05 -06:00
terrafrost
268ec2e5d1 Merge branch 'ssh2-identifier' 2013-12-28 13:49:05 -06:00
terrafrost
0ccac2c998 SSH2: add new line in docblock comment 2013-12-28 13:47:24 -06:00
Marc Philip Scholten
19be15c4c4 Fixed typos 2013-12-28 18:16:09 +01:00
Andreas Fischer
d48e284cae Merge branch 'master' into php5
* master:
  SFTP: make get() return correctly sized strings
2013-12-28 13:41:09 +01:00
Andreas Fischer
b9e785f292 Merge branch 'master' into php5
* master:
  RSA: remove unit test for time being - it's going to be renamed and rewritten
  RSA: update comments for _extractBER
  RSA: more verbose RSA key handling
2013-12-28 13:40:49 +01:00
terrafrost
466f9354df SFTP: make get() return correctly sized strings 2013-12-27 11:08:33 -06:00
terrafrost
a1b749a0a0 Merge branch 'master' into php5 2013-12-27 10:25:19 -06:00
terrafrost
d2c4ccfc28 Merge branch 'master' of https://github.com/phpseclib/phpseclib 2013-12-27 10:24:47 -06:00
Marc Philip Scholten
ad0c7c52bd Fixed cs 2013-12-26 21:02:18 +01:00
Marc Philip Scholten
b0de383f95 Replaced else { if ()...} with elseif() {} 2013-12-26 21:02:17 +01:00
Marc Philip Scholten
357d4253ee Fixed typo 2013-12-26 21:00:58 +01:00
Marc Philip Scholten
4817d28a54 Refactored Net_SSH2::$identifier and added unit tests
Added return tag
2013-12-26 21:00:58 +01:00
Andreas Fischer
28f6f19abe Merge branch 'master' into php5
* master:
  SSH2: better accomodate Phar's
2013-12-26 19:43:34 +01:00
Andreas Fischer
f63798b923 Merge pull request #233 from terrafrost/phar-fix
SSH2: better accomodate Phar's

* terrafrost/phar-fix:
  SSH2: better accomodate Phar's
2013-12-26 19:43:26 +01:00
Andreas Fischer
060ae325b7 Merge branch 'master' into php5
* master:
  Fixed classname of test
  Fixed some wrong @see annotations
  Fixed /e preg_replace modifier exactly like in 0dc8b27a6a
  Added Net_SSH1::_format_log test
2013-12-26 18:41:32 +01:00
Andreas Fischer
9c7c01c337 Merge pull request #223 from mpscholten/fix-ssh1-php55
Fix Net_SSH1 on Php5.5 (/e preg_replace modifier)

* mpscholten/fix-ssh1-php55:
  Fixed classname of test
  Fixed some wrong @see annotations
  Fixed /e preg_replace modifier exactly like in 0dc8b27a6a
  Added Net_SSH1::_format_log test
2013-12-26 18:41:25 +01:00
Marc Philip Scholten
6d8c02c432 Fixed some wrong @see annotations 2013-12-26 12:09:40 +01:00