PHP Secure Communications Library
Go to file
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
build Apply coding guidelines (with exceptions) to the tests directory. 2014-02-15 20:05:30 +01:00
phpseclib fix certificate date encoding 2014-03-28 15:02:50 +01:00
tests Tests for bug280. 2014-03-06 11:55:14 +01:00
travis Add basic SSH2 functional test as an example. 2014-03-03 02:14:27 +01:00
.gitattributes added build status and extra lines 2012-06-11 02:30:46 -06:00
.gitignore Only apply git ignores relative to repository root. 2013-11-23 20:33:37 +01:00
.travis.yml Add basic SSH2 functional test as an example. 2014-03-03 02:14:27 +01:00
AUTHORS AUTHORS: add more developers 2013-03-11 16:36:27 -05:00
composer.json composer: add System to psr-0 autoload section 2014-02-28 10:05:05 -06:00
composer.lock Update PHP_CodeSniffer from 1.4.7 to 1.5.2. This fixes a rule inheritance bug. 2014-02-15 19:40:19 +01:00
LICENSE Updated LICENSE 2013-11-23 21:18:24 +01:00
phpunit.xml.dist [feature/phpunit] Add phpunit configuration and bootstrapping. 2012-06-06 13:07:36 +02:00
README.md update README.md to show latest version 2014-02-22 19:03:22 -06:00

phpseclib - PHP Secure Communications Library

Build Status

MIT-licensed pure-PHP implementations of an arbitrary-precision integer arithmetic library, fully PKCS#1 (v2.1) compliant RSA, DES, 3DES, RC4, Rijndael, AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509

PEAR Channel PEAR Channel: [phpseclib.sourceforge.net](http://phpseclib.sourceforge.net/pear.htm)