Andreas Fischer
5d2590feb0
Replace ; with : in case statement.
2015-05-03 13:18:23 +02:00
terrafrost
7ac2470c98
Merge branch '1.0' of https://github.com/phpseclib/phpseclib into x509-custom-extensions
2015-03-09 01:38:33 -05:00
terrafrost
e686c095b6
X509: always base64-encode extensions for which _getMapping returns a bool
2015-03-01 12:05:49 -06:00
terrafrost
7e2dd90140
X509: make it so you can use File_ASN1_Element for custom X.509 extensions
2015-03-01 11:57:36 -06:00
Andreas Fischer
0efae5a91e
Change copyright years from roman numeral to decimal numbers.
2014-12-10 00:04:08 +01:00
terrafrost
83301097ea
RSA: rename PUBLIC_FORMAT_PKCS1_RAW -> PUBLIC_FORMAT_PKCS8
...
also make CRYPT_RSA_PUBLIC_FORMAT_PKCS8 the default format
2014-06-13 13:11:59 -05:00
terrafrost
72a0913d39
RSA: slight adjustment to CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW format
...
CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW and CRYPT_RSA_PUBLIC_FORMAT_PKCS1
produce two very similar looking keys but they are not the same.
As dissection OpenSSL's asn1parse would reveal CRYPT_RSA_PUBLIC_FORMAT_PKCS1
has the fact that it is an RSA key embedded within it whereas
CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW does not. phpseclib now resolves
this ambiguity in the same way that OpenSSH's ssh-keygen does.
Despite this change CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW is still incompatible
with OpenSSL's rsautl (CRYPT_RSA_PUBLIC_FORMAT_PKCS1 is compatible). I guess
this incompatibility isn't just due to the headers but is also due to the
overall structure of the format.
2014-06-10 22:16:59 -05:00
terrafrost
b1ad911d20
X509: CS adjustments
2014-06-05 08:33:27 -05:00
terrafrost
aabc5cf822
X509: PHP4 compat changes
2014-06-05 08:10:52 -05:00
terrafrost
dce03bb003
X509: add signSPKAC() and saveSPKAC() methods
2014-06-03 23:44:09 -05:00
terrafrost
dfa583b9ea
X509: Array -> array (CS consistency)
2014-03-29 15:26:50 -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
Veres Lajos
930a3fb4d2
typofixes - https://github.com/vlajos/misspell_fixer
2014-03-05 23:41:20 +00:00
Graham Campbell
1c2796e3eb
Cleaned up whitespace
2014-01-18 17:29:25 +00:00
terrafrost
b23a693ae5
RSA: update comments for _extractBER
2013-12-26 01:46:58 -06: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
cee0f3343b
CS: Fix "PEAR.Formatting.MultiLineAssignment.EqualSignLine" sniff.
2013-12-07 20:47:30 +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
a577a09a4f
X509: make it so ip addresses and domain names can be used together
2013-10-09 14:51:34 -05:00
terrafrost
9b53c45f04
ASN1,X509: add support for ip addresses in subjaltname
...
(among other places)
2013-10-09 14:25:52 -05:00
terrafrost
d2f6362878
X509: assume anything being passed into setPublicKey() is a public key
2013-10-05 21:28:33 -05:00
terrafrost
7b5542cc8a
X509: re-use existing BER extraction code
2013-08-02 10:52:58 -05:00
terrafrost
73f167e99e
X509: load Math/BigInteger for ASN1 description
2013-07-30 16:07:40 -05:00
terrafrost
d714dd35f0
X509: $csr -> $spkac in loadSPKAC() function
2013-07-26 16:10:34 -05:00
terrafrost
d52f217512
X509: change return value for validateSignature when cert isn't loaded
2013-07-26 15:40:16 -05:00
terrafrost
01bb284119
X509: adjust case of id-at-stateorprovinceName
...
Re: https://github.com/phpseclib/phpseclib/issues/130
2013-07-14 04:40:12 -05:00
terrafrost
fe3765fe17
X509: don't validate self-signed certs by default
2013-06-08 12:40:39 -05: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
Andreas Fischer
aa2e1ff177
[sourceforge-url-typo] {htp:// -> http://}phpseclib.sourceforge.net
2013-06-02 17:56:05 +02:00
Hans-Jürgen Petrich
b242259d17
optimizations
2013-05-13 12:41:52 +07:00
Veres Lajos
dd2a4ddff2
typofixes
2013-05-08 15:34:07 +01:00
terrafrost
fae87be6f5
X509: Revamp base64 handling
2013-04-02 19:36:52 -05:00
Patrick Monnerat
6b49b7d108
X509: Fix private key identifier computation on a File_ASN1_Element
2013-02-21 15:46:10 +01:00
Gemorroj
1e3e44e3c6
revert == instead ===
2013-02-20 17:55:44 +03:00
Gemorroj
cc2c844d0e
some minor fixes
2013-02-20 16:46:13 +03:00
terrafrost
5910f7c14f
Update date format in File/X509.php
...
Update it to be consistent with bdd42c448b
Thanks runaway518!
2013-02-05 07:53:36 -06:00
terrafrost
248e3bb085
Undo last commit
2013-01-30 08:37:50 -06:00
terrafrost
bfb04dcf4d
Add __construct() constructor to make namespace'ing easier for those wishing to do it
2013-01-29 22:09:31 -06:00
terrafrost
e71fc97913
Revamp SSH1 logging and go back to using user_error
...
(_handle_error returned the line number in _handle_error - not the line number triggering the error)
2013-01-08 22:09:27 -06:00
terrafrost
aa3da09747
Add limited SPKAC support
2012-12-19 00:21:55 -06:00
terrafrost
e4ccaef7bf
Make PEM lines be 64 bytes long instead of 72
...
Also, add more notes to Crypt_Random's comments
2012-12-18 07:11:24 -06:00
Patrick Monnerat
18fc6b7712
X509: Fix typo: ';' --> ':'
2012-12-10 12:27:07 +01:00