Commit Graph

3732 Commits

Author SHA1 Message Date
terrafrost
bdd42c448b Change default date format
This change stems from the fact that date('T') on PHP 4 (and possibly 5.0/5.1/etc) returns "Central Daylight Time" vs PHP 5, which returns "CDT".  "CDT" is parsable by strtotime - "Central Daylight Time" is not.

There will still be some dates that won't properly decode, however, on PHP 4.  Those dates would seem to be due to this (from php.net):

"On systems where time_t is a 32bit signed integer, as most common today, the valid range for year is somewhere between 1901 and 2038. However, before PHP 5.1.0 this range was limited from 1970 to 2038 on some systems (e.g. Windows)."
2012-10-19 07:19:22 -05:00
terrafrost
ecd9512ea8 Merge pull request #25 from monnerat/crl
ASN1: Fix default value optimization upon encoding.
2012-10-19 05:14:11 -07:00
Patrick Monnerat
4c5163234b ASN1: Fix default value optimization upon encoding.
Also encode SETs as SEQUENCEs since order is not important.
2012-10-18 12:38:43 +02:00
terrafrost
ce250ea546 Rename $keyIdentifier to $currentKeyIdentifier
$KeyIdentifier (upper case) is already defined and although it doesn't cause any problems with $keyIdentifier (lower case) I still think it's poor practice
2012-10-18 00:37:48 -05:00
terrafrost
8758ca8517 Merge pull request #24 from monnerat/crl
Certificate Revocation Lists
2012-10-16 04:34:34 -07:00
terrafrost
eba3fbe13e Suppress Warning messages
Warning messages would appear if recursive deletes or chmods were
attempted.  Also, doing pwd() when . was / would return //.
2012-10-13 19:42:01 -05:00
Patrick Monnerat
2c7c7b9679 X509, ASN1: Fix CS and indent. Remove tabs. 2012-10-12 16:17:34 +02:00
monnerat
ef96f777c3 X509: setSerialNumber(): new optional parameter $base 2012-10-12 03:29:25 +01:00
monnerat
711d44f0e5 X509: implement CRLs. 2012-10-12 03:13:39 +01:00
monnerat
6da490d00a X509: new setExtension() method. 2012-10-12 03:03:21 +01:00
monnerat
bc7a59bc8c X509: factorize some code in prevision of CRL support. 2012-10-12 02:56:23 +01:00
monnerat
73b0d05ddc X509: set-up key identifier upon certificate loading. 2012-10-12 02:42:19 +01:00
monnerat
4f634aaca8 X509: avoid some "undefined" errors. 2012-10-12 02:37:55 +01:00
monnerat
2c8ad5ee72 ASN1: _encode_der(): do not encode optional fields with value set to default. 2012-10-12 01:07:01 +01:00
monnerat
a75de60478 ASN1: asn1map(): fix handling of optional CHOICE and ANY children in SEQUENCE. 2012-10-12 01:04:24 +01:00
monnerat
b05cff1320 ASN1: process input NULL fields. 2012-10-12 01:01:20 +01:00
monnerat
50962f9cd3 ASN1: asn1map(): do not rely on input fields to determine mapping parameters. 2012-10-12 00:58:36 +01:00
monnerat
d9a3dafa0a ASN1: Support enumerated types by processing them as integers. 2012-10-12 00:51:42 +01:00
terrafrost
35d6910bf3 Revisions to _logError() function 2012-10-09 07:27:42 -05:00
terrafrost
827090c562 Update comments 2012-10-09 01:00:47 -05:00
terrafrost
c65f5ba0e5 Add SFTPv2 support
Thanks bitvise for providing an SFTP client that does SFTPv2 and to faceleg for bringing the issue to my attention!
2012-10-09 00:56:50 -05:00
terrafrost
7ba006ccdc Add getSize() function to Crypt_RSA 2012-10-07 18:53:26 -05:00
terrafrost
7d1e714a08 Remove extra white space 2012-10-07 09:48:58 -05:00
terrafrost
32857c5e7f CS adjustment 2012-10-06 10:50:19 -05:00
terrafrost
ec067c1f14 Merge pull request #23 from monnerat/newattrs
X509: handle multiple-valued attributes in setDNProp(). Fix setDN().
2012-10-06 08:16:15 -07:00
Patrick Monnerat
f4b03722fd X509: handle multiple-valued attributes in setDNProp(). Fix setDN(). 2012-10-01 12:35:43 +02:00
terrafrost
7cfcdf90f6 Merge branch 'master' of https://github.com/phpseclib/phpseclib 2012-09-30 21:37:25 -05:00
terrafrost
bb4995e446 Add $extra to logs 2012-09-30 21:32:26 -05:00
terrafrost
f8b05fb6ad Merge pull request #22 from monnerat/newattrs
X509: Fix 'OU' attribute mapping, add 'SN' (surname) short name, add 'ro...
2012-09-29 17:46:08 -07:00
terrafrost
ee25c73a44 Three fixes
- Ingore white space in keys
- Handle negative numbers in the same way OpenSSL seems to handle them
- Fix signature verification (thanks Richard Odekerken!)
2012-09-29 14:32:27 -05:00
Patrick Monnerat
45512c7a50 X509: Fix emailAddress attribute name mapping. 2012-09-27 16:50:58 +02:00
Patrick Monnerat
1377d56a4e X509: fix typo: improve new DN attrs handling. 2012-09-27 15:15:12 +02:00
Patrick Monnerat
29b9642965 X509: Fix 'OU' attribute mapping, add 'SN' (surname) short name, add 'role', 'title', 'description', 'x500UniqueIdentifier' DN attributes. 2012-09-27 14:38:37 +02:00
terrafrost
076050cc19 Ignore white spaces in CSRs and X.509 certs 2012-09-26 00:34:37 -05:00
terrafrost
13eed6147a Do CRYPT_DES_MODE_CBC instead of CRYPT_MODE_DES_CBC 2012-09-22 11:38:09 -05:00
terrafrost
3a5ab5276e CRYPT_MODE_DES_CBC should have been CRYPT_DES_MODE_CBC
Thanks arook!
2012-09-22 11:32:41 -05:00
terrafrost
6686e203e7 Reformat keys even if private key format is the same OpenSSL uses
As is private keys weren't being encrypted when a private key was being set and OpenSSL was being used.

Thanks TeigneuX!
2012-09-18 05:17:14 -05:00
terrafrost
ec5aead746 SSH-2.0-SSHD doesn't implement hmac-*-96 correctly 2012-09-17 02:33:03 -05:00
terrafrost
c7d6492f43 stat() and lstat() ignore false output from _stat()
Thanks Fluffycloud!
2012-09-16 18:50:16 -05:00
terrafrost
31ad9aacbd stream_set_blocking calls were unnecessary 2012-09-09 23:45:18 -05:00
terrafrost
5d91746f73 stream_select() failed when timeout went below 1 second 2012-09-03 14:48:18 -05:00
terrafrost
26776b486e Update a few comments 2012-09-03 01:42:50 -05:00
terrafrost
a3781bd172 Changing the public key format broke File_X509 2012-09-03 01:32:57 -05:00
terrafrost
c2c3e9420d Negative numbers should be prepended with a 0 2012-09-02 11:06:53 -05:00
terrafrost
0f95ddc692 Updated fix for php.pear.net bug # 18015
toBits() on an object for which setPrecision(8) has been called should always return 8 bits.

As such we'll just iterate backwards instead of forward.
2012-09-02 01:13:21 -05:00
terrafrost
5de5d45bd5 Workaround for buggy stream_select's
Workaround for this issue:

https://bugs.php.net/bug.php?id=42682

Thanks solefald!
2012-08-29 17:55:22 -05:00
terrafrost
e2ae5100c2 Fix a few E_NOTICEs 2012-08-28 03:04:15 -05:00
terrafrost
11872fe747 CRYPT_RSA_ASN1_SEQUENCE shouldn't have been used 2012-08-26 02:01:26 -05:00
terrafrost
770075fe08 Don't redefine MATH_BIGINTEGER_OPENSSL_ENABLED 2012-08-26 01:52:58 -05:00
terrafrost
2f8d1055ea Use OpenSSL for Math_BigInteger::modPow speedups
Also, make Crypt_RSA's public keys compatible with OpenSSL and make it so __toString will return the key even when it's the public key that's loaded and it hasn't been set as the public key.
2012-08-26 01:36:34 -05:00