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
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.
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
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
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.
Apply Code Sniffer to tests folder
* bantu/code-sniffer-tests:
Apply coding guidelines (with exceptions) to the tests directory.
Update PHP_CodeSniffer from 1.4.7 to 1.5.2. This fixes a rule inheritance bug.
Use exclude instead of changing severity.
Add build directory.
PHP_Compat is required when the PHP version below 4.3.3 (not above or eq...
* bantu/fix-php-compat-description:
PHP_Compat is required when the PHP version below 4.3.3 (not above or equal).
Run travis tests on HipHop Virtual Machine (hhvm).
* bantu/travis/hhvm:
The HHVM environment does not know phpize, so we can not install extensions.
Run travis tests on HipHop Virtual Machine (hhvm).