phpseclib/phpseclib — pull request #295 by michael-dev (2014-03-19 13:08:24+00:00)
Title: fix certificate validity encoding

Currently, phpseclib does not comply with RFC3280 section 4.1.2.5 Validity, as it always encodes signed certificate time stamps as generalTime, although notBefore and notAfter MUST be encoded as utcTime if they are before 2050.
This leads to openssl warnings:
Warning: openssl_x509_parse(): illegal ASN1 data type for timestamp

This patch fixes this by checking for the year and choosing utcTime or generalTime accordingly.