Commit Graph

1207 Commits

Author SHA1 Message Date
Andreas Fischer
48a917c3f8 Merge pull request #307 from bantu/travis-home-directory
Setup Travis CI phpseclib user home directory accordingly.

* bantu/travis-home-directory:
  Use pwd instead of ls. If the directory is empty callback will not be called.
  Setup Travis CI phpseclib user home directory accordingly.
2014-04-07 18:15:39 +02:00
Andreas Fischer
96aaa262eb Use pwd instead of ls. If the directory is empty callback will not be called. 2014-04-07 17:59:21 +02:00
terrafrost
677a291cb3 SSH: clarify role of constructor / connection timeout
Also, in Net_SSH2::_connect() $host is used in multiple places. Rather than changing all references to {$this->host}:{$this->port} preserve existing $host reference and update it accordingly
2014-04-07 10:26:46 -05:00
terrafrost
24bb941799 SSH1: do fsockopen() call when login has been called 2014-04-07 00:30:50 -05:00
terrafrost
6fcfe5c885 SSH2: != -> |= 2014-04-07 00:25:38 -05:00
terrafrost
8f08301744 SSH2: phpdoc changes 2014-04-07 00:19:35 -05:00
terrafrost
ab341df973 SSH2: syntax error 2014-04-07 00:16:54 -05:00
terrafrost
f27a49299e SSH2: timeout set in constructor != timeout set by setTimeout() 2014-04-07 00:02:03 -05:00
terrafrost
fc748346fc SSH2: add phpdoc header 2014-04-06 23:56:21 -05:00
terrafrost
a14e71f38b SSH2: connect to server in login() function
this change will make it so some parameters can be set after the
Net_SSH2 object has been created. eg. instead of doing
define('NET_SSH2_LOGGING', NET_SSH2_LOG_COMPLEX) one can now do
$ssh->setLogging(...) or something.
2014-04-06 23:45:25 -05:00
Andreas Fischer
526a5c2ffb Setup Travis CI phpseclib user home directory accordingly. 2014-04-06 23:30:35 +02:00
terrafrost
c8bf68ac02 ASN1: make it so bit string's can have an optional minimum size 2014-04-05 18:07:35 -05:00
Andreas Fischer
a3adb4fad5 Merge pull request #305 from bantu/remove-ssh-agent-bc-file
[php5] Remove the phpseclib/System/SSH_Agent.php BC file.

* bantu/remove-ssh-agent-bc-file:
  Remove the phpseclib/System/SSH_Agent.php BC file.
2014-04-02 01:35:32 +02:00
Andreas Fischer
0288817203 Remove the phpseclib/System/SSH_Agent.php BC file. 2014-04-01 23:15:16 +02:00
Andreas Fischer
b7729feea0 Merge branch 'master' into php5
* master:
  SSH_Agent: add new line at end of file to comply with CS
  SSH_Agent: another CS update
  SSH_Agent: CS updates
  SSH_Agent: mv SSH_Agent to SSH/Agent and create SSH_Agent for BC
2014-04-01 23:14:44 +02:00
Andreas Fischer
a455c1771e Merge pull request #304 from bantu/ssh-agent-psr0-fix
SSH_Agent: mv SSH_Agent to SSH/Agent and create SSH_Agent for BC

* bantu/ssh-agent-psr0-fix:
  SSH_Agent: add new line at end of file to comply with CS
  SSH_Agent: another CS update
  SSH_Agent: CS updates
  SSH_Agent: mv SSH_Agent to SSH/Agent and create SSH_Agent for BC
2014-04-01 23:13:58 +02:00
Andreas Fischer
6f4ddf0e33 SSH_Agent: add new line at end of file to comply with CS 2014-04-01 22:54:26 +02:00
terrafrost
1694012f78 SSH_Agent: another CS update 2014-03-30 16:37:11 -05:00
terrafrost
50b250ce69 SSH_Agent: CS updates 2014-03-30 16:32:05 -05:00
Andreas Fischer
51fbabd6d6 Merge branch 'master' into php5
* master:
  add error suppression to phpinfo()
2014-03-30 17:23:42 +02:00
Andreas Fischer
fba7376b08 Merge pull request #299 from terrafrost/phpinfo-fix
add error suppression to phpinfo()

* terrafrost/phpinfo-fix:
  add error suppression to phpinfo()
2014-03-30 17:23:30 +02:00
terrafrost
a8c2ff0fb0 add error suppression to phpinfo()
bad timezone settings can make phpinfo() throw errors so we'll just
suppress them. if there are legit non-timezone errors with php install
those will probably be hit in other parts of the code
2014-03-30 10:15:08 -05:00
terrafrost
924014fe72 SSH_Agent: mv SSH_Agent to SSH/Agent and create SSH_Agent for BC 2014-03-30 08:49:22 -05:00
terrafrost
a478b74860 ASN1: explicit application tags didn't work (although implicit ones did) 2014-03-30 01:11:47 -05:00
terrafrost
a9bdce9469 Merge remote-tracking branch 'origin/master' into php5 2014-03-29 15:28:50 -05:00
terrafrost
38502615d3 Merge remote-tracking branch 'michael/fix_cert_time_encoding' into php5 2014-03-29 15:28:39 -05:00
terrafrost
dfa583b9ea X509: Array -> array (CS consistency) 2014-03-29 15:26:50 -05:00
terrafrost
ea4dc53a06 Merge remote-tracking branch 'michael/fix_cert_time_encoding' 2014-03-29 15:25:32 -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
Andreas Fischer
c6b990432c Merge pull request #297 from terrafrost/ssh-channel-fix-2
fix more ssh channel issues

* terrafrost/ssh-channel-fix-2:
  fix more ssh channel issues
2014-03-21 18:27:00 +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
b77b26f692 Merge pull request #288 from bantu/drop-meaningless-version-tags
Drop version tags from doc blocks.

* bantu/drop-meaningless-version-tags:
  Drop meaningless, outdated, inconsistent version tags in doc blocks.
2014-03-13 00:03:21 +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
5dcc63ef6c Merge pull request #283 from bantu/tests-bug280
Tests for bug280 [use of $callback()]

* bantu/tests-bug280:
  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:11 +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
90ff32d56d Tests for bug280. 2014-03-06 11:55: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
Andreas Fischer
60e2bfc073 Merge pull request #282 from vlajos/typofixes-20140305
typo fixes

* vlajos/typofixes-20140305:
  typofixes - https://github.com/vlajos/misspell_fixer
2014-03-06 10:46:18 +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
d2d3c4605d Merge branch 'master' into php5
* master:
  Mark SSH2 Test as Incomplete on Travis PHP 5.3.3 and below for now.
  Add basic SSH2 functional test as an example.
  Extract phpunit call to run-phpunit.sh
  Introduce abstract class for functional tests.
2014-03-04 18:21:08 +01:00
Andreas Fischer
8b068b1df0 Merge pull request #278 from bantu/functional-tests
Introduce functional tests (SSH2 as an example)

* bantu/functional-tests:
  Mark SSH2 Test as Incomplete on Travis PHP 5.3.3 and below for now.
  Add basic SSH2 functional test as an example.
  Extract phpunit call to run-phpunit.sh
  Introduce abstract class for functional tests.
2014-03-04 18:21:01 +01:00
Andreas Fischer
3d3d55b407 Mark SSH2 Test as Incomplete on Travis PHP 5.3.3 and below for now. 2014-03-04 14:56:42 +01:00
Andreas Fischer
00c19f4cc1 Add basic SSH2 functional test as an example. 2014-03-03 02:14:27 +01:00
Andreas Fischer
dbcba51198 Extract phpunit call to run-phpunit.sh 2014-03-03 02:14:27 +01:00
Andreas Fischer
ea31d9d38c Introduce abstract class for functional tests. 2014-03-03 01:34:43 +01:00