Andreas Fischer
38e6196127
Merge branch 'master' into php5
...
* master:
ASN1: empty constructed context-specific tags error'd out
Conflicts:
phpseclib/File/ASN1.php
2015-01-11 16:09:50 +01:00
terrafrost
84325d415e
ASN1: empty constructed context-specific tags error'd out
...
eg. an attributes field in a CSR that's blank
2015-01-10 23:58:50 -06:00
Clint Nelissen
f3565346fa
Replaced get_class() calls with instanceof operators
2014-12-24 13:07:14 -08:00
Clint Nelissen
fe742e18d7
Namespaced Crypt Package
2014-12-16 16:16:54 -08:00
Andreas Fischer
3f912eed59
Merge pull request #554 from cnelissen/NamespaceFilePackage
...
Namespace file package
* cnelissen/NamespaceFilePackage:
Namespaced classes
2014-12-12 17:55:44 +01:00
Clint Nelissen
cea5e317b6
Namespaced classes
2014-12-09 16:53:05 -08:00
Andreas Fischer
c4b103468c
Merge pull request #549 from bantu/fix-547
...
Change copyright years from roman numeral to decimal numbers.
* bantu/fix-547:
Change copyright years from roman numeral to decimal numbers.
Conflicts:
phpseclib/System/SSH_Agent.php
2014-12-10 00:06:08 +01:00
Andreas Fischer
0efae5a91e
Change copyright years from roman numeral to decimal numbers.
2014-12-10 00:04:08 +01:00
Clint Nelissen
e8c93d8cfe
Docblock fix
2014-12-04 08:30:07 -08:00
Clint Nelissen
a9925941b0
Moved global constants into class constants and updated all references
2014-12-03 18:20:10 -08:00
Andreas Fischer
638e62d60a
Remove LICENSE text from source code files.
2014-12-03 18:49:33 +01:00
Clint Nelissen
feca21da2b
Split File_ASN1 and File_ASN1_Element into separate files
2014-12-01 19:26:52 -08:00
Andreas Fischer
eff5f64560
Merge branch 'master' into php5
...
* master:
ASN1: fix unit test
ASN1: add unit test for non-constructed context-specific change
ASN1: fix issue with non-constructed context-specific tags
README: update download link to 0.3.8
2014-09-24 16:50:12 +02:00
terrafrost
a2f4a2cbba
ASN1: add unit test for non-constructed context-specific change
2014-09-22 23:03:06 -05:00
terrafrost
c6ad2b69ba
ASN1: fix issue with non-constructed context-specific tags
2014-09-22 01:01:34 -05:00
Andreas Fischer
6cb0528d6e
Merge branch 'master' into php5
...
* master:
ASN1: one more unit test change
ASN1: another unit test update
ASN1: unit test adjustments
ASN1: cs adjustments to unit test
ASN1: add unit tests for indefinite length decoding
ASN1: CS adjustment (rm whitespace at eol)
ASN1: rewrite _decode_der
Conflicts:
phpseclib/File/ASN1.php
2014-09-04 22:22:16 +02:00
terrafrost
3bb123c3d5
ASN1: CS adjustment (rm whitespace at eol)
2014-08-30 19:44:12 -05:00
terrafrost
e258e001fa
ASN1: rewrite _decode_der
...
this rewrite makes phpseclib better able to handle indef lengths,
which had previously been untested.
2014-08-25 10:12:56 -05:00
Andreas Fischer
67aedc240b
Change constructors from class name to __construct().
...
This has been produced as follows:
<?php
$replace = $files = [];
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($argv[1]));
foreach ($it as $fileinfo) {
if ($fileinfo->getExtension() === 'php') {
$file = $fileinfo->getPathname();
$content = file_get_contents($file);
$files[$file] = $content;
$tokens = token_get_all($content);
foreach ($tokens as $key => $value) {
if ($value[0] === T_CLASS) {
$class = $tokens[$key + 2][1];
$replace += array(
"$class::$class(" => "$class::__construct(",
"parent::$class(" => "parent::__construct(",
"function $class(" => "function __construct(",
);
}
}
}
}
foreach ($files as $file => $content) {
file_put_contents(
$file,
str_replace(
array_keys($replace),
array_values($replace),
$content
)
);
}
2014-06-16 17:06:34 +02:00
Andreas Fischer
a643e5bfb5
Correct the remaining case by using instanceof.
2014-06-02 20:24:25 +02:00
Andreas Fischer
f2f5fcd70a
Update users of Math_BigInteger.
2014-06-02 20:19:00 +02:00
terrafrost
1b9c599476
ASN1: let strings in as well
2014-05-05 17:38:33 -05:00
terrafrost
7a9ea673ca
ASN1: make File_ASN1 accept int primitives and not just Math_BigInteger objects when an integer is expected
...
The code to convert the regular integer type into the appropriate format could all just be in-line'd when an integer primitive is used but this approach is easier to read.
2014-05-05 16:39:35 -05:00
terrafrost
10be403aff
ASN1: CS update
2014-04-12 12:01:04 -05:00
terrafrost
61cd5e4f5a
ASN1: make developing new ASN.1 scripts a little easier
2014-04-10 13:49:28 -05:00
terrafrost
c8bf68ac02
ASN1: make it so bit string's can have an optional minimum size
2014-04-05 18:07:35 -05:00
terrafrost
a478b74860
ASN1: explicit application tags didn't work (although implicit ones did)
2014-03-30 01:11:47 -05:00
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
Andreas Fischer
fb1296bbec
Drop meaningless, outdated, inconsistent version tags in doc blocks.
...
find phpseclib -type f -name "*.php" -exec sed -i '/@version/d' {} \;
2014-03-11 15:58:33 +01:00
Andreas Fischer
8bb80b3df0
CS: Add useful whitespace CodeSniffer rules.
2013-12-26 00:33:08 +01:00
Andreas Fischer
f0f029b2c1
CS: Fix "PEAR.Commenting.ClassComment.WrongTagOrder" sniff.
2013-12-11 18:33:18 +01:00
Andreas Fischer
3db1fbb072
CS: Fix "PEAR.Commenting.FileComment.TagIndent" sniff.
2013-12-10 20:10:37 +01:00
Andreas Fischer
6d1fb9f7db
CS: Fix "PEAR.Files.IncludingFile.UseIncludeOnce" sniff.
2013-12-06 01:03:34 +01:00
Andreas Fischer
bc6ff96292
Fix "PEAR.Files.IncludingFile.BracketsNotRequired" sniff.
2013-12-05 23:17:40 +01:00
Andreas Fischer
161bb7d362
CS: Fix PEAR.ControlStructures.ControlSignature sniff.
2013-12-03 21:04:13 +01:00
Andreas Fischer
9ca5f83dec
CS: Fix Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterComma sniff.
2013-12-03 20:52:08 +01:00
Andreas Fischer
e09f1b730e
CodeSniffer: Fix PEAR.Classes.ClassDeclaration.OpenBraceNewLine sniff.
2013-12-03 19:34:41 +01:00
Andreas Fischer
ca9c8b107b
CodeSniffer: Fix Generic.PHP.LowerCaseConstant.Found sniff.
2013-12-03 18:54:43 +01:00
Marc Philip Scholten
3bfd884813
Removed vim comments
...
Reformated files
2013-11-23 19:42:26 +01:00
terrafrost
22502c24cd
ASN1: variable functions had to be strings before PHP 5.4
2013-10-12 12:19:54 -05:00
terrafrost
9b53c45f04
ASN1,X509: add support for ip addresses in subjaltname
...
(among other places)
2013-10-09 14:25:52 -05:00
Patrick Monnerat
23d48c4fc5
ASN1: Integers should by at least 1 byte long.
...
Fixes https://github.com/phpseclib/phpseclib/issues/126 .
2013-07-01 14:38:35 +02:00
Andreas Fischer
727dba5905
[remove-svn-version-lines] Remove useless @version: $Id$ lines.
...
These lines served some purpose on SVN, but are now useless on Git. They
actually do harm as they might make people think their files are older
than they actually are.
2013-06-02 18:50:46 +02:00
terrafrost
b2262f731d
Merge branch 'master' of https://github.com/phpseclib/phpseclib
2013-05-14 11:02:45 -05:00
terrafrost
ff88b7e685
ASN1: CS adjustments
2013-05-14 10:38:01 -05:00
Hans-Jürgen Petrich
b242259d17
optimizations
2013-05-13 12:41:52 +07:00
Veres Lajos
ddaf520b3b
typofixes
2013-05-10 11:51:49 +01:00
terrafrost
147c3ebea4
ASN1: if an int val would be '' make it be "\0"
2013-03-26 19:50:24 -05:00
terrafrost
a3e3682feb
ASN.1: Add headerlength and fix start
2013-03-23 12:12:29 -05:00
Patrick Monnerat
90ff746ad1
Make all sources 7-bit ASCII.
2013-02-20 19:25:47 +01:00