-
-
Notifications
You must be signed in to change notification settings - Fork 879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setEndDate cannot have a date after year 2038 #1166
Comments
I guess you're using a 32-bit system. This doesn't appear to be an issue on a 64-bit system. Or, more specifically, a build of PHP where PHP_INT_SIZE is 8. That said, phpseclib is supposed to work on 32-bit builds. I'll see if I can't get this working with DateTime or nesbot/carbon or some such. |
Sorry for the delay. Anyway, I made a branch off of the 2.0 branch that utilizes DateTime instead of unix time: https://github.com/terrafrost/phpseclib/tree/datetime-2.0 Doing it for 1.0 is do'able but will be trickier. phpseclib 1.0 is, syntactically, PHP4 compatible. It uses PHP5 functions that can be emulated by existant shims but if you do DateTime was only introduced in PHP 5.2 (phpseclib 2.0, due to it's use of namespaces, requires PHP 5.3). What I figure I'll do for that is have phpseclib 1.0 use both. It'll do edit: surprisingly, Per that I'm not actually sure it'd be possible to create an OOP |
@terrafrost yes we are using a 32-bit system but the php version is 5.6.11-1. Is it therefore possible to
do this ^? |
Sorry for the delay. Anyway, this should be fixed in the 1.0, 2.0 and master branches now: |
I am using phpseclib 1.0(.7) (since it is LTS and provides the lifetime certificates) and currently I am trying to validate some dates in certificates with the "validateDate()" function.
The problem is that I can only use an end date which is before year 2038 for my certificates because of the "year 2038 problem".
A "lifetime" end date has a minor problem, too.
The rfc string 99991231235959Z is working for me only with 99981231235959Z since the date class otherwise does not accept the new value. It seems that date only accepts years until 9999 and not above.
The text was updated successfully, but these errors were encountered: