1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-12-02 17:48:00 +01:00
Commit Graph

337 Commits

Author SHA1 Message Date
terrafrost
5eacf2b05d - do class_exists(Crypt_Random) too to facilitate auto-loading 2012-06-24 16:53:16 -05:00
terrafrost
9e69344d60 - better timeout handling (thanks moizhb) 2012-06-23 17:16:42 -05:00
terrafrost
6ee991f604 Merge branch 'master' of https://github.com/phpseclib/phpseclib 2012-06-20 10:43:20 -05:00
terrafrost
1e3778dc4f - auto loading fixes (thanks skydiablo) 2012-06-20 10:36:36 -05:00
terrafrost
dfe264594f Merge pull request #9 from bantu/feature/consistent-file-endings
[feature/consistent-file-endings] Remove ?> and make sure there is an empty line at the end of files.
2012-06-16 21:06:15 -07:00
terrafrost
ccd2b6ae78 - PBKDF2 updates 2012-06-16 16:42:54 -05:00
Andreas Fischer
eb64dfef7d [feature/consistent-file-endings] Make sure files have empty line at the end. 2012-06-11 10:34:07 +02:00
Andreas Fischer
5923f4ad68 [feature/consistent-file-endings] Remove remaining ?> from PHP files. 2012-06-11 10:33:39 +02:00
terrafrost
9d0b172103 - exit-status's sent before channel data no longer produce empty output 2012-06-10 21:52:30 -05:00
terrafrost
2306b73677 - remove PHP_Compat stuff; install PHP_Compat from PEAR if you want PHP4 support 2012-06-10 21:40:31 -05:00
terrafrost
5999f93ce3 - attempt to make it so File/ANSI.php doesn't always show up with git status 2012-06-09 14:29:03 -05:00
Rob Loach
8d8b5e09dd Fix for syntax error found by @bantu #r954245 2012-06-08 18:48:23 -04:00
Rob Loach
7e9a975296 Add Composer support to phpseclib 2012-06-08 15:38:27 -04:00
terrafrost
0b7673eb56 Merge remote-tracking branch 'bantu/topic/40730' 2012-06-06 08:10:54 -05:00
Andreas Fischer
3e450fa978 [topic/36062] Change unconditional includes to require_once in ASN1 and X509. 2012-06-06 13:14:06 +02:00
Andreas Fischer
71dea1fc2b [topic/40730] Use strlen() instead of count() in function _equals() of Crypt_RSA.
It appears that count() always returns int(1) on strings. Thus, this check is
pointless as is. strlen() was meant here and is actually required to prevent
E_NOTICEs from invalid array accesses using $y[$i].
2012-06-06 13:12:48 +02:00
terrafrost
e484373a2b - updates to _remove directory (thanks, bantu) 2012-06-05 23:44:40 -05:00
Jim Wigginton
e5ee7809c4 - add partial VT100 terminal emulator to decode ANSI escape codes from Net_SSH2::read()
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@223 21d32557-59b3-4da0-833f-c5933fad653e
2012-05-27 22:20:42 +00:00
Jim Wigginton
7f1c861c1a - $this->mcrypt was removed in a commit from yesterday
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@222 21d32557-59b3-4da0-833f-c5933fad653e
2012-05-14 18:20:11 +00:00
Jim Wigginton
3141c0f803 - if the SFTP connection was closed prematurely put() could hang (thanks, KCC!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@221 21d32557-59b3-4da0-833f-c5933fad653e
2012-05-14 01:43:49 +00:00
Jim Wigginton
b39d2597dd - if the algorithm is not supported upon mcrypt's initial initialization use the internal implementation
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@220 21d32557-59b3-4da0-833f-c5933fad653e
2012-05-14 01:21:21 +00:00
Jim Wigginton
5a4595ab56 - when the child is an optional CHOICE it needs to be explicit and not implicit
- make asn1map more accurate

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@219 21d32557-59b3-4da0-833f-c5933fad653e
2012-05-13 17:52:12 +00:00
Jim Wigginton
5db0f88218 - add blinded rsa equality test (thanks singpolyma!)
- make validateSignature behave more like openssl_verify()

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@218 21d32557-59b3-4da0-833f-c5933fad653e
2012-05-05 23:57:30 +00:00
Jim Wigginton
7ef3108d00 - add two new logging modes
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@217 21d32557-59b3-4da0-833f-c5933fad653e
2012-04-30 16:25:37 +00:00
Jim Wigginton
9a7d6cdb54 - add !is_resource() check
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@216 21d32557-59b3-4da0-833f-c5933fad653e
2012-04-24 05:01:55 +00:00
Jim Wigginton
da8614a511 - add getIssuerDN()
- fill in getPublicKey() stub
- add 'lifetime' option to setEndDate()
- fix a bug that'd prevent certs with File_ASN1_Element being saved

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@215 21d32557-59b3-4da0-833f-c5933fad653e
2012-04-23 03:57:34 +00:00
Jim Wigginton
a90bba115c - make it so certs can be setup as CA's
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@214 21d32557-59b3-4da0-833f-c5933fad653e
2012-04-22 17:11:29 +00:00
Jim Wigginton
3dd9e2b318 - id-at-organizationalUnitName was misnamed as id-at-dnQualifier
- make it so CA's can't be loaded if the keyusage extension doesn't permit their being loaded
- implement validateURL() function stub
- add support for a few more DN attributes
- add removeDNProp(), getDNProp() and setDomain()
- fixed some issues preventing new certs from being signed

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@213 21d32557-59b3-4da0-833f-c5933fad653e
2012-04-22 06:00:55 +00:00
Jim Wigginton
392ff50c00 - sign() didn't save subjectPublicKeyInfo correctly
- sign() could erase the subject's DN from an existing X.509 cert
- setSerialNumber didn't save the serial number correctly

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@212 21d32557-59b3-4da0-833f-c5933fad653e
2012-04-17 06:47:39 +00:00
Jim Wigginton
6d60fa63e5 - make it so the following all do the same thing:
$pubKey = new Crypt_RSA();
$pubKey->loadKey($privKey->getPublicKey());
$pubKey->setPublicKey();

$pubKey = new Crypt_RSA();
$pubKey->loadKey($privKey->getPublicKey());
$pubKey->setPublicKey($privKey->getPublicKey());

$pubKey = new Crypt_RSA();
$pubKey->setPublicKey($privKey->getPublicKey());

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@211 21d32557-59b3-4da0-833f-c5933fad653e
2012-04-17 06:21:42 +00:00
Jim Wigginton
960dd01fe1 - add full support for the id-ce-authorityKeyIdentifier and id-ce-subjectKeyIdentifier extensions via setKeyIdentifier() function
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@210 21d32557-59b3-4da0-833f-c5933fad653e
2012-04-16 04:35:37 +00:00
Jim Wigginton
3f9aa1ad6a - make it so an array returned by loadX509() can be reloaded by loadX509()
- validateDate() didn't work
- add postalCode and streetAddress as supported DN attributes
- add getDN()
- split setKey() out into setPrivateKey() and setPublicKey()
- add sign(), setStartDate(), setEndDate(), setSerialNumber(), removeExtension(), getExtension() and getExtensions()

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@209 21d32557-59b3-4da0-833f-c5933fad653e
2012-04-15 17:17:16 +00:00
Jim Wigginton
09f4bef2f1 - add loadCSR(), setKey(), setDN() and setDNProp()
- refactor some code

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@208 21d32557-59b3-4da0-833f-c5933fad653e
2012-04-09 03:13:53 +00:00
Jim Wigginton
42e5ad80f7 - BMPString's should be decoded via decodeBER(), use UTF8 strings for everything but policy qualifiers and make policy qualifiers optional
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@207 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-25 00:24:03 +00:00
Jim Wigginton
5cc327e0c3 - fix a bunch of E_NOTICEs, add support for the id-ce-certificatePolicies extension, add limited validation
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@206 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-20 05:25:43 +00:00
Jim Wigginton
81beb6e2e2 - fix E_NOTICES
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@205 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-12 03:23:04 +00:00
Jim Wigginton
60340d5466 - make it so setPublicKey() can guess at the format like loadKey() can
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@204 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-11 19:13:34 +00:00
Jim Wigginton
1b2dde6e7d - encode the subjectPublicKey in a format Crypt_RSA can use (assuming the algorithm is rsaEncryption)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@203 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-11 19:00:28 +00:00
Jim Wigginton
1b161ece26 - add support for id-ce-nameConstraints
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@202 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-11 08:41:06 +00:00
Jim Wigginton
441ada0502 - add an X.509 encoder / decoder
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@201 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-11 07:54:41 +00:00
Jim Wigginton
228fb3ceb9 - - close the channel when a NET_SSH2_CHANNEL_REQUEST exit-status is received (thanks, ferus!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@200 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-07 18:57:45 +00:00
Jim Wigginton
40bc51da99 - fix some E_NOTICES (thanks, ferus!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@199 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-05 15:32:15 +00:00
Jim Wigginton
6309f5a70a - read() doesn't give an E_WARNING when $expect is blank
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@198 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-05 03:13:09 +00:00
Jim Wigginton
329d3e2a15 - send a NET_SSH2_MSG_CHANNEL_CLOSE packet in addition to a NET_SSH2_MSG_CHANNEL_EOF packet when force closing the channel (thanks, ferus!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@197 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-05 02:06:13 +00:00
Jim Wigginton
6d3e3dd12e - setTimeout() updates
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@196 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-03 19:56:22 +00:00
Jim Wigginton
1ab30836a6 - make it so requests can timeout (thanks pmprojx!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@195 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-03 17:49:16 +00:00
Jim Wigginton
8ad76c9236 - get() no longer needs to know the size of a file to download it (thanks xyzzy!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@194 21d32557-59b3-4da0-833f-c5933fad653e
2012-01-20 06:36:16 +00:00
Jim Wigginton
883b13f540 - fclose() was being called twice (thanks zyzzy!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@193 21d32557-59b3-4da0-833f-c5933fad653e
2012-01-20 05:39:10 +00:00
Jim Wigginton
8e0845f411 - make it so size() doesn't give an E_NOTICE if the size attribute isn't present
- make delete() recursive by default
- fix a bug that prevented inbound packets from being logged

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@192 21d32557-59b3-4da0-833f-c5933fad653e
2012-01-20 05:33:19 +00:00
Jim Wigginton
257b18501e - make setHash non case sensitive (thanks e1ven!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@191 21d32557-59b3-4da0-833f-c5933fad653e
2011-12-14 13:36:31 +00:00
Jim Wigginton
019edc6694 - the key has to be truncated before setKey() is called or else it'll be rounded up to the nearest key size - not down
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@190 21d32557-59b3-4da0-833f-c5933fad653e
2011-11-25 00:11:19 +00:00
Jim Wigginton
f600a9bb50 - !== is faster than !=
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@189 21d32557-59b3-4da0-833f-c5933fad653e
2011-11-24 19:03:56 +00:00
Jim Wigginton
70ea9ceec8 - update link to svn.php.net
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@188 21d32557-59b3-4da0-833f-c5933fad653e
2011-11-24 18:46:12 +00:00
Jim Wigginton
e8d6d8d165 - use openssl_random_pseudo_bytes if available (thanks wise.man!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@187 21d32557-59b3-4da0-833f-c5933fad653e
2011-11-24 18:32:49 +00:00
Jim Wigginton
b1c7fed946 - the IV wasn't resetting when mcrypt was being used
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@186 21d32557-59b3-4da0-833f-c5933fad653e
2011-11-16 06:53:36 +00:00
Jim Wigginton
a00a5e6ba4 - add pbkdf2 support via setPassword()
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@185 21d32557-59b3-4da0-833f-c5933fad653e
2011-11-13 02:23:56 +00:00
Jim Wigginton
bc1c12357d - CRYPT_RSA_PUBLIC_FORMAT_XML didn't work correctly
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@184 21d32557-59b3-4da0-833f-c5933fad653e
2011-11-07 08:25:59 +00:00
Jim Wigginton
a1f3ee7b69 - fix potential E_NOTICE in modInverse (thanks bantu!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@183 21d32557-59b3-4da0-833f-c5933fad653e
2011-11-07 02:27:01 +00:00
Jim Wigginton
cfcf20cce5 - add the ability to save newly created keys in the XML and PuTTY formats
- add the ability to save private keys that have already been loaded

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@182 21d32557-59b3-4da0-833f-c5933fad653e
2011-11-07 01:35:12 +00:00
Jim Wigginton
0531f713ab - close local file if one is being used and if get() would return prematurely (thanks, Sascha.Pfalz!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@181 21d32557-59b3-4da0-833f-c5933fad653e
2011-10-14 05:46:18 +00:00
Jim Wigginton
034ec72ade - if a binary packet can't be decrypt don't bother to process it further
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@180 21d32557-59b3-4da0-833f-c5933fad653e
2011-10-06 12:12:56 +00:00
Jim Wigginton
58b4b8d681 - make realtime logging better accommodate whitespace
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@179 21d32557-59b3-4da0-833f-c5933fad653e
2011-09-17 18:46:04 +00:00
Jim Wigginton
7e416149c1 - NET_SFTP_APPEND -> NET_SFTP_RESUME
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@178 21d32557-59b3-4da0-833f-c5933fad653e
2011-09-10 05:46:19 +00:00
Jim Wigginton
d7c43d03a2 - fix bug with pure-PHP CTR mode (thanks, Max!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@177 21d32557-59b3-4da0-833f-c5933fad653e
2011-09-04 16:23:50 +00:00
Jim Wigginton
2676ca1d91 - password protected PuTTY keys error out ungracefully when a bad password is used to decrypt
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@176 21d32557-59b3-4da0-833f-c5933fad653e
2011-08-17 00:12:42 +00:00
Jim Wigginton
023e0e0540 - make it so chmod can be done recursively
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@175 21d32557-59b3-4da0-833f-c5933fad653e
2011-08-03 19:03:56 +00:00
Jim Wigginton
285b7d511c - cache directories and make it so directories can be recursively deleted
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@174 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-31 07:23:21 +00:00
Jim Wigginton
68a5d7d4db - add real-time in-line logging capabilities to Net/SFTP.php (useful if you're dumping the output to a file or if you're trying to figure out why a script is timing out or something)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@173 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-23 15:53:23 +00:00
Jim Wigginton
a5d702346a - improved handling of malformed RSA keys: part II
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@172 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-11 00:37:46 +00:00
Jim Wigginton
d4a3d61ff5 - improved handling of malformed RSA keys (thanks scope_v24!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@171 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-11 00:02:53 +00:00
Jim Wigginton
d86bf78506 - add support for the sticky bit
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@170 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-06 05:43:48 +00:00
Jim Wigginton
bc5e07cd69 - updates to the upload resume functionality
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@169 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-04 20:42:05 +00:00
Jim Wigginton
8b352152dd - add the ability to resume sftp uploads
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@168 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-04 00:46:00 +00:00
Jim Wigginton
38f1bd487f /home and /home/ should return the same thing for rawlist() and nlist() (thanks pioyu!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@167 21d32557-59b3-4da0-833f-c5933fad653e
2011-06-25 15:06:43 +00:00
Jim Wigginton
3da6c0d608 /home and /home/ should return the same thing for rawlist() and nlist() (thanks pioyu!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@166 21d32557-59b3-4da0-833f-c5933fad653e
2011-06-20 03:23:44 +00:00
Jim Wigginton
497df88951 - only log the last 1MB of an ssh transaction (this way logs can be obtained even when you're uploading terabytes and terabytes of data)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@165 21d32557-59b3-4da0-833f-c5933fad653e
2011-06-04 17:06:53 +00:00
Jim Wigginton
96471cf1dd - fix an E_NOTE error in Rijndael.php (thanks, tchamness!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@164 21d32557-59b3-4da0-833f-c5933fad653e
2011-06-04 16:10:05 +00:00
Jim Wigginton
48494b64c8 - stat() should probably not say whether or not the target file is a symlink - presumably that's something only lstat() should do
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@163 21d32557-59b3-4da0-833f-c5933fad653e
2011-06-01 04:24:16 +00:00
Jim Wigginton
893695d7f3 - stat() and lstat() now return information on the file type
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@162 21d32557-59b3-4da0-833f-c5933fad653e
2011-06-01 01:51:47 +00:00
Jim Wigginton
2b855b8869 - fix some E_NOTICEs and remove superfluous SFTP error log entries (thanks, Major Tom!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@161 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-30 21:24:16 +00:00
Jim Wigginton
332726db74 - if you want to use UTF-8 encoded passwords encode them as UTF-8 yourself (ie. save your PHP script as UTF-8 without BOM; thanks, gruberroland!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@160 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-29 14:43:17 +00:00
Jim Wigginton
737ea2c9e9 - add support for a new type of key format (thanks spotweb2!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@159 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-28 16:23:15 +00:00
Jim Wigginton
34cdb781cc - update SSH1 logging and disconnecting
- add better support for an as-yet-to-be-written SCP class
- update example of read()

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@158 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-08 23:53:30 +00:00
Jim Wigginton
c61b3f9da9 - fix E_NOTICE (thanks, loige!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@157 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-08 03:09:11 +00:00
Jim Wigginton
c6bc908f63 - suppress errors about empty strings being passed to crypto object
- fix a bug in read() that broke NET_SSH2_READ_REGEX

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@156 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-08 02:34:36 +00:00
Jim Wigginton
bfacdf5cdf - fix E_NOTICEs (thanks, lordxor!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@155 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-08 02:31:52 +00:00
Jim Wigginton
e42adbeaf9 - suppress errors when fread() times out
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@154 21d32557-59b3-4da0-833f-c5933fad653e
2011-04-22 07:50:24 +00:00
Jim Wigginton
b614ab4dc0 - read(...) only returned first byte of matched string - not entire matched string
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@153 21d32557-59b3-4da0-833f-c5933fad653e
2011-04-18 21:37:06 +00:00
Jim Wigginton
392d96445e - add support for PuTTY and XML formatted RSA keys
- remove ?>'s from PHP_Compat files
- update LICENSE block
- make it so NET_SSH2_MSG_USERAUTH_PK_OK records direction and time

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@152 21d32557-59b3-4da0-833f-c5933fad653e
2011-04-18 12:17:40 +00:00
Jim Wigginton
0e40350db7 - syntax error
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@151 21d32557-59b3-4da0-833f-c5933fad653e
2011-04-01 12:00:35 +00:00
Jim Wigginton
9660724387 - make get() return false if the SSH_FXP_READ packet failed
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@150 21d32557-59b3-4da0-833f-c5933fad653e
2011-03-31 10:49:33 +00:00
Jim Wigginton
73f0886e87 - show first byte if message type is unknown to assist with diagnosis
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@149 21d32557-59b3-4da0-833f-c5933fad653e
2011-03-31 09:37:24 +00:00
Jim Wigginton
06e8afb418 - fixed a bug that could prevent _emsa_pss_verify from working in rare circumstances (thanks Lesque!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@148 21d32557-59b3-4da0-833f-c5933fad653e
2011-03-19 03:32:22 +00:00
Jim Wigginton
458f4f7ef0 - add interactive mode support to Net_SSH2 and redo interactive support in Net_SSH1
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@147 21d32557-59b3-4da0-833f-c5933fad653e
2011-02-28 05:24:09 +00:00
Jim Wigginton
f6f9f3887d - extended attributes were not handled correctly (thanks scope_v24!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@146 21d32557-59b3-4da0-833f-c5933fad653e
2011-02-19 08:18:39 +00:00
Jim Wigginton
13b8afd620 - update Net_SFTP to better support SCP
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@145 21d32557-59b3-4da0-833f-c5933fad653e
2011-02-13 07:46:01 +00:00
Jim Wigginton
27700e9ca7 - changed $fp to $urandom (thanks, Ben!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@144 21d32557-59b3-4da0-833f-c5933fad653e
2011-02-08 05:16:11 +00:00
Jim Wigginton
a4d39a9e66 - array_slice() reindexes the array so we'll use array_pop() instead
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@143 21d32557-59b3-4da0-833f-c5933fad653e
2011-02-06 16:35:48 +00:00
Jim Wigginton
5eea5be210 - fopen() can fail even when file_exists() succeeds (thanks, dakitiger!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@142 21d32557-59b3-4da0-833f-c5933fad653e
2011-02-06 01:12:20 +00:00
Jim Wigginton
80bf62d6fc - fix issues with partially generated RSA keys (thanks, Ben!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@141 21d32557-59b3-4da0-833f-c5933fad653e
2011-02-06 00:04:07 +00:00
Jim Wigginton
029b61bc5e - parse the longname to get the file type (only currently works for Net_SFTP::rawlist())
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@140 21d32557-59b3-4da0-833f-c5933fad653e
2011-01-16 16:25:46 +00:00
Jim Wigginton
bf49338fa9 - the ciphertext wasn't being null padded correctly when it wasn't a multiple of the block size (thanks Elledan!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@139 21d32557-59b3-4da0-833f-c5933fad653e
2010-12-04 14:48:06 +00:00
Jim Wigginton
4ab5b5c16f - rm some legacy code and make Crypt_TripleDES better handle short keys
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@138 21d32557-59b3-4da0-833f-c5933fad653e
2010-12-02 04:59:46 +00:00
Jim Wigginton
354a0965e8 - AES should try to auto-predict the size of keys when the size isn't specified; last update interfered with that
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@137 21d32557-59b3-4da0-833f-c5933fad653e
2010-12-02 03:38:22 +00:00
Jim Wigginton
4d4cc0e0f5 - keys should now be null padded if they're too short
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@136 21d32557-59b3-4da0-833f-c5933fad653e
2010-12-01 05:09:01 +00:00
Jim Wigginton
fb0f03c904 - added $block parameter to Net_SSH2::exec() (thanks jl_ewing!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@135 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-30 04:34:31 +00:00
Jim Wigginton
d5f788932c fix typo in comments
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@134 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-21 23:43:26 +00:00
Jim Wigginton
66b5dad728 - rm debug code
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@133 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-20 14:45:42 +00:00
Jim Wigginton
3d68aa3353 - add Net_SFTP::stat() and Net_SFTP::lstat() (thanks, TangiX!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@132 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-20 14:02:28 +00:00
Jim Wigginton
a31d9ba38d - rm debug code
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@131 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-20 02:13:39 +00:00
Jim Wigginton
b94a467999 - change license to the less restrictive MIT license (if people want to modify phpseclib and distribute binaries of it [whatever that means for PHP] without including the source code I don't care); two of the three PHP_Compat stuff still uses the LGPL since I didn't author them but they're only needed, anyway, if you're using phpseclib on PHP4.
- add svn:eol-style: LF to all files
- fixed pear.php.net bug # 18037 (thanks, nounours!)

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@130 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-13 19:28:20 +00:00
Jim Wigginton
19cc43cc16 - fixed pear.php.net bug # 18015 (thanks, nounours!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@129 21d32557-59b3-4da0-833f-c5933fad653e
2010-10-31 01:05:29 +00:00
Jim Wigginton
3cb86474ae - fixed a bug in Net_SFTP::delete()
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@127 21d32557-59b3-4da0-833f-c5933fad653e
2010-10-24 05:32:30 +00:00
Jim Wigginton
dd4f0036f2 - fixed a bug that prevented key re-exchange from working
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@126 21d32557-59b3-4da0-833f-c5933fad653e
2010-10-24 01:24:30 +00:00
Jim Wigginton
297f281001 - changed the sftp packet size (thanks, achrarajeev!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@125 21d32557-59b3-4da0-833f-c5933fad653e
2010-10-02 22:23:25 +00:00
Jim Wigginton
a15cf62d3a - change $ecb to $this->ecb
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@124 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-26 05:24:52 +00:00
Jim Wigginton
2140de74d0 - fixed a warning in Crypt_Rijndael
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@123 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-26 05:02:10 +00:00
Jim Wigginton
76655b8bf9 - CFB mode is now supported as a stream cipher
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@122 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-26 03:10:20 +00:00
Jim Wigginton
bbe68cf7ae - fixed a bug in keyboard-interactive authentication (thanks, j31!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@121 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-12 22:12:45 +00:00
Jim Wigginton
202c3b64e9 - added support for OFB and CFB modes (with the caveat that CFB mode isn't currently supported as a stream cipher)
- improvements to the fix to the bug Suby found
- fixed bug whereby CTR mode gave different results in mcrypt and internal modes when the continuous buffer was enabled and the plaintext being encrypted wasn't a multiple of the block size
- undid the fix for the bug f.dammassa found (thanks, j31!)


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@120 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-12 21:58:54 +00:00
Jim Wigginton
b3690e0fde - added support for AES-128-CBC encrypted private keys (ie. the default format of OpenSSH 5.4+)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@119 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-05 03:04:29 +00:00
Jim Wigginton
4264336d02 - apparently not all SFTPv3 clients support SSH_FXP_FSTAT (even though the SFTPv3 specs define it; thanks, f.dammassa!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@118 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-02 00:49:26 +00:00
Jim Wigginton
acefc441be - fixed a bug preventing getLastSFTPError() and getSFTPErrors() from working (thanks, f.dammassa!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@117 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-01 03:36:09 +00:00
Jim Wigginton
a8863e2b3d - included a work-around for a bug in Portable OpenSSH 4.4 and earlier whereby faulty key sizes are used for aes256-ctr, aes192-ctr and arcfour256 (thanks, f.dammassa!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@116 21d32557-59b3-4da0-833f-c5933fad653e
2010-08-29 03:27:02 +00:00
Jim Wigginton
d07570b0eb - added limited support for keyboard-interactive authentication (thanks, j31!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@115 21d32557-59b3-4da0-833f-c5933fad653e
2010-08-28 17:26:22 +00:00
Jim Wigginton
d9d70f8797 - fixed a few bugs in Crypt_Hash
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@114 21d32557-59b3-4da0-833f-c5933fad653e
2010-08-08 21:29:39 +00:00
Jim Wigginton
f088d89712 - add logging to Net_SSH1 and fixed a bug in Crypt_DES (thanks, Suby!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@113 21d32557-59b3-4da0-833f-c5933fad653e
2010-08-08 05:06:38 +00:00
Jim Wigginton
3ef15724be - undo last commit - if you want to load a public key use loadKey(). it's called loadKey() and not loadPublicKey() for a reason. and while you're at it reread the documentation. i do have to concede, though... i should have read my own documentation before making the last commit.
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@112 21d32557-59b3-4da0-833f-c5933fad653e
2010-07-11 02:33:13 +00:00
Jim Wigginton
d6a8f6c648 - added phpdoc headers for _list()
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@111 21d32557-59b3-4da0-833f-c5933fad653e
2010-06-29 01:33:39 +00:00
Jim Wigginton
dff1ab92d6 - fixed bug in setPublicKey function (thanks nicklong!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@110 21d32557-59b3-4da0-833f-c5933fad653e
2010-06-19 12:01:21 +00:00
Jim Wigginton
94f48a97d4 c -> C
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@109 21d32557-59b3-4da0-833f-c5933fad653e
2010-05-16 16:10:50 +00:00
Jim Wigginton
978a11607e - more useful error message if the server closes the connection after sending their identification string
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@108 21d32557-59b3-4da0-833f-c5933fad653e
2010-05-10 16:16:35 +00:00
Jim Wigginton
a33bc87e83 - SSH servers whose identification string had trailing spaces wouldn't calculate the exchange hash correctly (thanks voxo!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@107 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-27 21:29:36 +00:00
Jim Wigginton
068983328f - replace < with . in log output since < causes logs not to show up correctly in web browsers. could escape it, too, but then that'd potentially make CLI logs use more width than the terminal has
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@106 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-25 14:19:43 +00:00
Jim Wigginton
6057a9da8f - fixed a bug in Crypt_Random
- SSH2 logging now more closely resembles the format of PuTTY logs


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@105 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-24 06:40:49 +00:00
Jim Wigginton
b1566eed93 - signatures are now only verified if you're requesting the server host key since otherwise the sever could be using it's own made up host key and you'd never know
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@104 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-22 16:06:43 +00:00
Jim Wigginton
fa9e1f4f50 - suppress possible openbase_dir errors
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@103 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-13 12:41:14 +00:00
Jim Wigginton
7fd48f8e72 - compatability adjustments for interoperability with strictly PKCS#1 v1.5 compliant RSA implementations
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@102 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-10 15:57:02 +00:00
Jim Wigginton
868bcbd159 - nlist() and rawlist() were switched
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@101 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-09 02:31:34 +00:00
Jim Wigginton
95153d6d59 - added Net_SFTP::rawlist() (thanks, theduck!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@100 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-08 14:41:07 +00:00
Jim Wigginton
39c97d3373 - crypt_random() used /dev/urandom in a rather slow way (thanks, TangiX!)
- revamped the logging system.  now, you can profile SSH2.php / SFTP.php without capturing full logs


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@99 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-07 03:50:54 +00:00
Jim Wigginton
9a3c2e836b - added size() to Net_SFTP (thanks, Ethorsen!)
- adjusted encryption algorithm preferences for speed (thanks, TangiX!)


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@98 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-04 00:20:03 +00:00
Jim Wigginton
1983dd5649 - added parenthesis to two @see phpdoc comments
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@97 21d32557-59b3-4da0-833f-c5933fad653e
2010-03-22 22:32:03 +00:00
Jim Wigginton
71b960d082 - updated some comments
- fixed an E_NOTICE (thanks, Brion Vibber!)


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@96 21d32557-59b3-4da0-833f-c5933fad653e
2010-03-22 22:01:38 +00:00
Jim Wigginton
1539cd4a01 - the triple equals in Math_BigIinteger::equals() made it so float(1) != int(1), so all instances where float(1) might occur have been removed
- Crypt_RSA::_blind() should now be faster.


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@95 21d32557-59b3-4da0-833f-c5933fad653e
2010-03-01 17:28:19 +00:00
Jim Wigginton
c0b0886762 - use crypt_random for RSA blinding
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@94 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-28 06:57:00 +00:00
Jim Wigginton
695207246a - fixed a bug that prevented multi-prime RSA keys from loading
- slightly refactored Random.php
- implemented RSA blinding


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@93 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-28 05:28:38 +00:00
Jim Wigginton
1a2b6e1087 - fixed two E_NOTICE errors (thanks, beanboots!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@92 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-27 23:34:46 +00:00
Jim Wigginton
748983a824 - speed up BigInteger.php
- added support for more public / private key formats (thanks, m4rc!)


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@91 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-26 03:40:26 +00:00
Jim Wigginton
d574a6770e - rewrote randomPrime()
- fixed a bug in Math_BigInteger::equals() that only manifests itself when the bcmath extension is used


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@90 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-21 07:45:31 +00:00