mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-13 18:02:58 +00:00
Merge branch '2.0' into 3.0
This commit is contained in:
commit
5335dbde3e
17
CHANGELOG.md
17
CHANGELOG.md
@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## 3.0.18 - 2022-12-17
|
||||
|
||||
- fix for PHP 8.2 deprecations (#1869, #1873)
|
||||
- SSH2: if logging in with rsa-sha2-256/512 fails, try ssh-rsa (#1865)
|
||||
- SSH/Agent: add support for named pipes on windows (for pageant) (#1866)
|
||||
- Crypt/Base: add a function to check continuous buffer status (#1870)
|
||||
- OpenSSL 3.0.1+ deprecated some algorithms (RC2, RC4, DES, Blowfish)
|
||||
|
||||
## 3.0.17 - 2022-10-24
|
||||
|
||||
- X509: make it so CRLs, CSRs and SPKACs can support PSS keys (#1837)
|
||||
@ -163,6 +171,15 @@
|
||||
- Salsa20 / ChaCha20
|
||||
- namespace changed from `phpseclib\` to `\phpseclib3` to facilitate phpseclib 2 shim (phpseclib2_compat)
|
||||
|
||||
## 2.0.40 - 2022-12-17
|
||||
|
||||
- fix for PHP 8.2 deprecations (#1869)
|
||||
- SSH2: if logging in with rsa-sha2-256/512 fails, try ssh-rsa (#1865)
|
||||
- SSH/Agent: add support for named pipes on windows (for pageant) (#1866)
|
||||
- Crypt/Base: add a function to check continuous buffer status (#1870)
|
||||
- OpenSSL 3.0.1+ deprecated some algorithms (RC2, RC4, DES, Blowfish)
|
||||
>>>>>>> 2.0
|
||||
|
||||
## 2.0.39 - 2022-10-24
|
||||
|
||||
- SFTP: fix deprecated implicit float to int on 32-bit PHP 8.1 (#1841)
|
||||
|
37
phpseclib/File/ASN1/Maps/AttCertIssuer.php
Normal file
37
phpseclib/File/ASN1/Maps/AttCertIssuer.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AttCertIssuer
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* AttCertIssuer
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class AttCertIssuer
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_CHOICE,
|
||||
'children' => [
|
||||
'v1Form' => GeneralNames::MAP,
|
||||
'v2Form' => [
|
||||
'constant' => 0,
|
||||
'optional' => true,
|
||||
] + V2Form::MAP,
|
||||
],
|
||||
];
|
||||
}
|
34
phpseclib/File/ASN1/Maps/AttCertValidityPeriod.php
Normal file
34
phpseclib/File/ASN1/Maps/AttCertValidityPeriod.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AttCertValidityPeriod
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* AttCertValidityPeriod
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class AttCertValidityPeriod
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'notBeforeTime' => ['type' => ASN1::TYPE_GENERALIZED_TIME],
|
||||
'notAfterTime' => ['type' => ASN1::TYPE_GENERALIZED_TIME],
|
||||
],
|
||||
];
|
||||
}
|
31
phpseclib/File/ASN1/Maps/AttCertVersion.php
Normal file
31
phpseclib/File/ASN1/Maps/AttCertVersion.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AttCertVersion
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* AttCertVersion
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class AttCertVersion
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_INTEGER,
|
||||
'mapping' => ['v2'],
|
||||
];
|
||||
}
|
31
phpseclib/File/ASN1/Maps/AttCertVersionV1.php
Normal file
31
phpseclib/File/ASN1/Maps/AttCertVersionV1.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AttCertVersion
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* AttCertVersion
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class AttCertVersionV1
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_INTEGER,
|
||||
'mapping' => ['v1'],
|
||||
];
|
||||
}
|
49
phpseclib/File/ASN1/Maps/AttributeCertificateInfo.php
Normal file
49
phpseclib/File/ASN1/Maps/AttributeCertificateInfo.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AttributeCertificateInfo
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* AttributeCertificateInfo
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class AttributeCertificateInfo
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'version' => [
|
||||
'optional' => true,
|
||||
'default' => 'v2',
|
||||
] + AttCertVersion::MAP,
|
||||
'holder' => Holder::MAP,
|
||||
'issuer' => AttCertIssuer::MAP,
|
||||
'signature' => AlgorithmIdentifier::MAP,
|
||||
'serialNumber' => CertificateSerialNumber::MAP,
|
||||
'attrCertValidityPeriod' => AttCertValidityPeriod::MAP,
|
||||
'attributes' => [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'min' => 0,
|
||||
'max' => -1,
|
||||
'children' => Attribute::MAP,
|
||||
],
|
||||
'issuerUniqueID' => ['optional' => true] + UniqueIdentifier::MAP,
|
||||
'extensions' => ['optional' => true] + Extensions::MAP,
|
||||
],
|
||||
];
|
||||
}
|
61
phpseclib/File/ASN1/Maps/AttributeCertificateInfoV1.php
Normal file
61
phpseclib/File/ASN1/Maps/AttributeCertificateInfoV1.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AttributeCertificateInfoV1
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* AttributeCertificateInfoV1
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class AttributeCertificateInfoV1
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'version' => [
|
||||
'optional' => true,
|
||||
'default' => 'v1',
|
||||
] + AttCertVersionV1::MAP,
|
||||
'subject' => [
|
||||
'type' => ASN1::TYPE_CHOICE,
|
||||
'children' => [
|
||||
'baseCertificateID' => [
|
||||
'constant' => 0,
|
||||
'optional' => true,
|
||||
] + IssuerSerial::MAP,
|
||||
'subjectName' => [
|
||||
'constant' => 1,
|
||||
'optional' => true,
|
||||
] + GeneralNames::MAP,
|
||||
],
|
||||
],
|
||||
'issuer' => GeneralNames::MAP,
|
||||
'signature' => AlgorithmIdentifier::MAP,
|
||||
'serialNumber' => CertificateSerialNumber::MAP,
|
||||
'attCertValidityPeriod' => AttCertValidityPeriod::MAP,
|
||||
'attributes' => [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'min' => 0,
|
||||
'max' => -1,
|
||||
'children' => Attribute::MAP,
|
||||
],
|
||||
'issuerUniqueID' => ['optional' => true] + UniqueIdentifier::MAP,
|
||||
'extensions' => ['optional' => true] + Extensions::MAP,
|
||||
],
|
||||
];
|
||||
}
|
35
phpseclib/File/ASN1/Maps/AttributeCertificateV1.php
Normal file
35
phpseclib/File/ASN1/Maps/AttributeCertificateV1.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AttributeCertificateV1
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* AttributeCertificateV1
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class AttributeCertificateV1
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'acinfo' => AttributeCertificateInfoV1::MAP,
|
||||
'signatureAlgorithm' => AlgorithmIdentifier::MAP,
|
||||
'signature' => ['type' => ASN1::TYPE_BIT_STRING],
|
||||
],
|
||||
];
|
||||
}
|
35
phpseclib/File/ASN1/Maps/AttributeCertificateV2.php
Normal file
35
phpseclib/File/ASN1/Maps/AttributeCertificateV2.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AttributeCertificateV2
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* AttributeCertificateV2
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class AttributeCertificateV2
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'acinfo' => AttributeCertificateInfo::MAP,
|
||||
'signatureAlgorithm' => AlgorithmIdentifier::MAP,
|
||||
'signature' => ['type' => ASN1::TYPE_BIT_STRING],
|
||||
],
|
||||
];
|
||||
}
|
31
phpseclib/File/ASN1/Maps/CMSVersion.php
Normal file
31
phpseclib/File/ASN1/Maps/CMSVersion.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CMSVersion
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* CMSVersion
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class CMSVersion
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_INTEGER,
|
||||
'mapping' => ['v0', 'v1', 'v2', 'v4', 'v5'],
|
||||
];
|
||||
}
|
53
phpseclib/File/ASN1/Maps/CertificateChoices.php
Normal file
53
phpseclib/File/ASN1/Maps/CertificateChoices.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CertificateChoices
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* CertificateChoices
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class CertificateChoices
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_CHOICE,
|
||||
'children' => [
|
||||
'certificate' => Certificate::MAP,
|
||||
'extendedCertificate' => [
|
||||
'constant' => 0,
|
||||
'optional' => true,
|
||||
'implicit' => true,
|
||||
] + ExtendedCertificate::MAP,
|
||||
'v1AttrCert' => [
|
||||
'constant' => 1,
|
||||
'optional' => true,
|
||||
'implicit' => true,
|
||||
] + AttributeCertificateV1::MAP,
|
||||
'v2AttrCert' => [
|
||||
'constant' => 2,
|
||||
'optional' => true,
|
||||
'implicit' => true,
|
||||
] + AttributeCertificateV2::MAP,
|
||||
'other' => [
|
||||
'constant' => 3,
|
||||
'optional' => true,
|
||||
'implicit' => true,
|
||||
] + OtherCertificateFormat::MAP,
|
||||
],
|
||||
];
|
||||
}
|
33
phpseclib/File/ASN1/Maps/CertificateSet.php
Normal file
33
phpseclib/File/ASN1/Maps/CertificateSet.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CertificateSet
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* CertificateSet
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class CertificateSet
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SET,
|
||||
'min' => 1,
|
||||
'max' => -1,
|
||||
'children' => CertificateChoices::MAP,
|
||||
];
|
||||
}
|
35
phpseclib/File/ASN1/Maps/CompressedData.php
Normal file
35
phpseclib/File/ASN1/Maps/CompressedData.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CompressedData
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* CompressedData
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class CompressedData
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'version' => CMSVersion::MAP,
|
||||
'compressionAlgorithms' => CompressionAlgorithmIdentifiers::MAP,
|
||||
'encapContentInfo' => EncapsulatedContentInfo::MAP,
|
||||
],
|
||||
];
|
||||
}
|
27
phpseclib/File/ASN1/Maps/CompressionAlgorithmIdentifier.php
Normal file
27
phpseclib/File/ASN1/Maps/CompressionAlgorithmIdentifier.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CompressionAlgorithmIdentifier
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* CompressionAlgorithmIdentifier
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class CompressionAlgorithmIdentifier extends AlgorithmIdentifier
|
||||
{
|
||||
}
|
39
phpseclib/File/ASN1/Maps/ContentInfo.php
Normal file
39
phpseclib/File/ASN1/Maps/ContentInfo.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ContentInfo
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* ContentInfo
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class ContentInfo
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'contentType' => ContentType::MAP,
|
||||
'content' => [
|
||||
'type' => ASN1::TYPE_ANY,
|
||||
'constant' => 0,
|
||||
'optional' => true,
|
||||
'explicit' => true,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
30
phpseclib/File/ASN1/Maps/ContentType.php
Normal file
30
phpseclib/File/ASN1/Maps/ContentType.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ContentType
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* ContentType
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class ContentType
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_OBJECT_IDENTIFIER,
|
||||
];
|
||||
}
|
27
phpseclib/File/ASN1/Maps/DigestAlgorithmIdentifier.php
Normal file
27
phpseclib/File/ASN1/Maps/DigestAlgorithmIdentifier.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* DigestAlgorithmIdentifier
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* DigestAlgorithmIdentifier
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class DigestAlgorithmIdentifier extends AlgorithmIdentifier
|
||||
{
|
||||
}
|
33
phpseclib/File/ASN1/Maps/DigestAlgorithmIdentifiers.php
Normal file
33
phpseclib/File/ASN1/Maps/DigestAlgorithmIdentifiers.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* DigestAlgorithmIdentifiers
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* DigestAlgorithmIdentifiers
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class DigestAlgorithmIdentifiers extends AlgorithmIdentifier
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SET,
|
||||
'min' => 1,
|
||||
'max' => -1,
|
||||
'children' => DigestAlgorithmIdentifier::MAP
|
||||
];
|
||||
}
|
34
phpseclib/File/ASN1/Maps/ESSCertID.php
Normal file
34
phpseclib/File/ASN1/Maps/ESSCertID.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ESSCertID
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* ESSCertID
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class ESSCertID
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'certHash' => Hash::MAP, // sha1 hash of the entire cert
|
||||
'issuerSerial' => ['optional' => true] + IssuerSerial::MAP,
|
||||
],
|
||||
];
|
||||
}
|
38
phpseclib/File/ASN1/Maps/ESSCertIDv2.php
Normal file
38
phpseclib/File/ASN1/Maps/ESSCertIDv2.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ESSCertIDv2
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* ESSCertIDv2
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class ESSCertIDv2
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'hashAlgorithm' => [
|
||||
'optional' => true,
|
||||
'default' => ['algorithm' => 'id-sha256', 'parameters' => ['null' => '']],
|
||||
] + AlgorithmIdentifier::MAP,
|
||||
'certHash' => Hash::MAP,
|
||||
'issuerSerial' => ['optional' => true] + IssuerSerial::MAP,
|
||||
],
|
||||
];
|
||||
}
|
39
phpseclib/File/ASN1/Maps/EncapsulatedContentInfo.php
Normal file
39
phpseclib/File/ASN1/Maps/EncapsulatedContentInfo.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* EncapsulatedContentInfo
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* EncapsulatedContentInfo
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class EncapsulatedContentInfo
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'eContentType' => ContentType::MAP,
|
||||
'eContent' => [
|
||||
'type' => ASN1::TYPE_OCTET_STRING,
|
||||
'constant' => 0,
|
||||
'optional' => true,
|
||||
'explicit' => true,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
37
phpseclib/File/ASN1/Maps/ExtendedCertificate.php
Normal file
37
phpseclib/File/ASN1/Maps/ExtendedCertificate.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ExtendedCertificate
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* ExtendedCertificate
|
||||
*
|
||||
* mapping is from <ftp://ftp.rsasecurity.com/pub/pkcs/ascii/pkcs-6.asc>
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class ExtendedCertificate
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'extendedCertificateInfo' => ExtendedCertificateInfo::MAP,
|
||||
'signatureAlgorithm' => AlgorithmIdentifier::MAP,
|
||||
'attributes' => ['type' => ASN1::TYPE_BIT_STRING],
|
||||
],
|
||||
];
|
||||
}
|
35
phpseclib/File/ASN1/Maps/ExtendedCertificateInfo.php
Normal file
35
phpseclib/File/ASN1/Maps/ExtendedCertificateInfo.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ExtendedCertificateInfo
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* ExtendedCertificateInfo
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class ExtendedCertificateInfo
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'version' => ['type' => ASN1::TYPE_INTEGER],
|
||||
'certificate' => Certificate::MAP,
|
||||
'attributes' => Attributes::MAP,
|
||||
],
|
||||
];
|
||||
}
|
28
phpseclib/File/ASN1/Maps/Hash.php
Normal file
28
phpseclib/File/ASN1/Maps/Hash.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Hash
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* Hash
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class Hash
|
||||
{
|
||||
public const MAP = ['type' => ASN1::TYPE_OCTET_STRING];
|
||||
}
|
44
phpseclib/File/ASN1/Maps/Holder.php
Normal file
44
phpseclib/File/ASN1/Maps/Holder.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Holder
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* Holder
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class Holder
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'baseCertificateID' => [
|
||||
'constant' => 0,
|
||||
'optional' => true,
|
||||
] + IssuerSerial::MAP,
|
||||
'entityName' => [
|
||||
'constant' => 1,
|
||||
'optional' => true,
|
||||
] + GeneralNames::MAP,
|
||||
'objectDigestInfo' => [
|
||||
'constant' => 2,
|
||||
'optional' => true,
|
||||
] + ObjectDigestInfo::MAP,
|
||||
],
|
||||
];
|
||||
}
|
34
phpseclib/File/ASN1/Maps/IssuerAndSerialNumber.php
Normal file
34
phpseclib/File/ASN1/Maps/IssuerAndSerialNumber.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* IssuerAndSerialNumber
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* IssuerAndSerialNumber
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class IssuerAndSerialNumber
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'issuer' => Name::MAP,
|
||||
'serialNumber' => CertificateSerialNumber::MAP,
|
||||
],
|
||||
];
|
||||
}
|
34
phpseclib/File/ASN1/Maps/IssuerSerial.php
Normal file
34
phpseclib/File/ASN1/Maps/IssuerSerial.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* IssuerSerial
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* IssuerSerial
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class IssuerSerial
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'issuer' => GeneralNames::MAP,
|
||||
'serialNumber' => CertificateSerialNumber::MAP,
|
||||
],
|
||||
];
|
||||
}
|
46
phpseclib/File/ASN1/Maps/ObjectDigestInfo.php
Normal file
46
phpseclib/File/ASN1/Maps/ObjectDigestInfo.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ObjectDigestInfo
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* ObjectDigestInfo
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class ObjectDigestInfo
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'digestedObjectType' => [
|
||||
'type' => ASN1::TYPE_ENUMERATED,
|
||||
'children' => [
|
||||
'publicKey',
|
||||
'publicKeyCert',
|
||||
'otherObjectTypes',
|
||||
],
|
||||
],
|
||||
'otherObjectTypeID' => [
|
||||
'type' => ASN1::TYPE_OBJECT_IDENTIFIER,
|
||||
'optiona' => true,
|
||||
],
|
||||
'digestAlgorithm' => AlgorithmIdentifier::MAP,
|
||||
'objectDigest' => ['type' => ASN1::TYPE_BIT_STRING],
|
||||
],
|
||||
];
|
||||
}
|
34
phpseclib/File/ASN1/Maps/OtherCertificateFormat.php
Normal file
34
phpseclib/File/ASN1/Maps/OtherCertificateFormat.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* OtherCertificateFormat
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* OtherCertificateFormat
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class OtherCertificateFormat
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'otherCertFormat' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER],
|
||||
'otherCert' => ['type' => ASN1::TYPE_ANY],
|
||||
],
|
||||
];
|
||||
}
|
34
phpseclib/File/ASN1/Maps/OtherRevocationInfoFormat.php
Normal file
34
phpseclib/File/ASN1/Maps/OtherRevocationInfoFormat.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* OtherRevocationInfoFormat
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* OtherRevocationInfoFormat
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class OtherRevocationInfoFormat
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'otherRevInfoFormat' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER],
|
||||
'otherRevInfo' => ['type' => ASN1::TYPE_ANY],
|
||||
],
|
||||
];
|
||||
}
|
38
phpseclib/File/ASN1/Maps/RevocationInfoChoice.php
Normal file
38
phpseclib/File/ASN1/Maps/RevocationInfoChoice.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* RevocationInfoChoice
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* RevocationInfoChoice
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class RevocationInfoChoice
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_CHOICE,
|
||||
'children' => [
|
||||
'crl' => CertificateList::MAP,
|
||||
'other' => [
|
||||
'constant' => 1,
|
||||
'optional' => true,
|
||||
'implicit' => true,
|
||||
] + OtherRevocationInfoFormat::MAP,
|
||||
],
|
||||
];
|
||||
}
|
33
phpseclib/File/ASN1/Maps/RevocationInfoChoices.php
Normal file
33
phpseclib/File/ASN1/Maps/RevocationInfoChoices.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* RevocationInfoChoices
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* RevocationInfoChoices
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class RevocationInfoChoices
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SET,
|
||||
'min' => 1,
|
||||
'max' => -1,
|
||||
'children' => RevocationInfoChoice::MAP,
|
||||
];
|
||||
}
|
27
phpseclib/File/ASN1/Maps/SignatureAlgorithmIdentifier.php
Normal file
27
phpseclib/File/ASN1/Maps/SignatureAlgorithmIdentifier.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SignatureAlgorithmIdentifier
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* SignatureAlgorithmIdentifier
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class SignatureAlgorithmIdentifier extends AlgorithmIdentifier
|
||||
{
|
||||
}
|
28
phpseclib/File/ASN1/Maps/SignatureValue.php
Normal file
28
phpseclib/File/ASN1/Maps/SignatureValue.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SignatureValue
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* SignatureValue
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class SignatureValue
|
||||
{
|
||||
public const MAP = ['type' => ASN1::TYPE_OCTET_STRING];
|
||||
}
|
33
phpseclib/File/ASN1/Maps/SignedAttributes.php
Normal file
33
phpseclib/File/ASN1/Maps/SignedAttributes.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SignedAttributes
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* SignedAttributes
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class SignedAttributes
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SET,
|
||||
'min' => 1,
|
||||
'max' => -1,
|
||||
'children' => Attribute::MAP,
|
||||
];
|
||||
}
|
46
phpseclib/File/ASN1/Maps/SignedData.php
Normal file
46
phpseclib/File/ASN1/Maps/SignedData.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SignedData
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* SignedData
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class SignedData
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'version' => CMSVersion::MAP,
|
||||
'digestAlgorithms' => DigestAlgorithmIdentifiers::MAP,
|
||||
'encapContentInfo' => EncapsulatedContentInfo::MAP,
|
||||
'certificates' => [
|
||||
'constant' => 0,
|
||||
'optional' => true,
|
||||
'implicit' => true,
|
||||
] + CertificateSet::MAP,
|
||||
'crls' => [
|
||||
'constant' => 1,
|
||||
'optional' => true,
|
||||
'implicit' => true,
|
||||
] + RevocationInfoChoices::MAP,
|
||||
'signerInfos' => SignerInfos::MAP,
|
||||
],
|
||||
];
|
||||
}
|
37
phpseclib/File/ASN1/Maps/SignerIdentifier.php
Normal file
37
phpseclib/File/ASN1/Maps/SignerIdentifier.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SignerIdentifier
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* SignerIdentifier
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class SignerIdentifier
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_CHOICE,
|
||||
'children' => [
|
||||
'issuerAndSerialNumber' => IssuerAndSerialNumber::MAP,
|
||||
'subjectKeyIdentifier' => [
|
||||
'constant' => 0,
|
||||
'optional' => true,
|
||||
] + SubjectKeyIdentifier::MAP,
|
||||
],
|
||||
];
|
||||
}
|
47
phpseclib/File/ASN1/Maps/SignerInfo.php
Normal file
47
phpseclib/File/ASN1/Maps/SignerInfo.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SignerInfo
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* SignerInfo
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class SignerInfo
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'version' => CMSVersion::MAP,
|
||||
'sid' => SignerIdentifier::MAP,
|
||||
'digestAlgorithm' => DigestAlgorithmIdentifier::MAP,
|
||||
'signedAttrs' => [
|
||||
'constant' => 0,
|
||||
'optional' => true,
|
||||
'implicit' => true,
|
||||
] + SignedAttributes::MAP,
|
||||
'signatureAlgorithm' => SignatureAlgorithmIdentifier::MAP,
|
||||
'signature' => SignatureValue::MAP,
|
||||
'unsignedAttrs' => [
|
||||
'constant' => 1,
|
||||
'optional' => true,
|
||||
'implicit' => true,
|
||||
] + UnsignedAttributes::MAP,
|
||||
],
|
||||
];
|
||||
}
|
33
phpseclib/File/ASN1/Maps/SignerInfos.php
Normal file
33
phpseclib/File/ASN1/Maps/SignerInfos.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SignerInfo
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* SignerInfo
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class SignerInfos
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SET,
|
||||
'min' => 1,
|
||||
'max' => -1,
|
||||
'children' => SignerInfo::MAP,
|
||||
];
|
||||
}
|
44
phpseclib/File/ASN1/Maps/SigningCertificate.php
Normal file
44
phpseclib/File/ASN1/Maps/SigningCertificate.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SigningCertificate
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* SigningCertificate
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class SigningCertificate
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'certs' => [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'min' => 1,
|
||||
'max' => -1,
|
||||
'children' => ESSCertID::MAP,
|
||||
],
|
||||
'policies' => [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'min' => 1,
|
||||
'max' => -1,
|
||||
'children' => PolicyInformation::MAP,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
44
phpseclib/File/ASN1/Maps/SigningCertificateV2.php
Normal file
44
phpseclib/File/ASN1/Maps/SigningCertificateV2.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SigningCertificate
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* SigningCertificate
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class SigningCertificate
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'certs' => [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'min' => 1,
|
||||
'max' => -1,
|
||||
'children' => ESSCertIDv2::MAP,
|
||||
],
|
||||
'policies' => [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'min' => 1,
|
||||
'max' => -1,
|
||||
'children' => PolicyInformation::MAP,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
28
phpseclib/File/ASN1/Maps/SubjectKeyIdentifier.php
Normal file
28
phpseclib/File/ASN1/Maps/SubjectKeyIdentifier.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SubjectKeyIdentifier
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* SubjectKeyIdentifier
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class SubjectKeyIdentifier
|
||||
{
|
||||
public const MAP = ['type' => ASN1::TYPE_OCTET_STRING];
|
||||
}
|
33
phpseclib/File/ASN1/Maps/UnsignedAttributes.php
Normal file
33
phpseclib/File/ASN1/Maps/UnsignedAttributes.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* UnsignedAttributes
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* UnsignedAttributes
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class UnsignedAttributes
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SET,
|
||||
'min' => 1,
|
||||
'max' => -1,
|
||||
'children' => Attribute::MAP,
|
||||
];
|
||||
}
|
41
phpseclib/File/ASN1/Maps/V2Form.php
Normal file
41
phpseclib/File/ASN1/Maps/V2Form.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* V2Form
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright 2016 Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpseclib3\File\ASN1\Maps;
|
||||
|
||||
use phpseclib3\File\ASN1;
|
||||
|
||||
/**
|
||||
* V2Form
|
||||
*
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
*/
|
||||
abstract class V2Form
|
||||
{
|
||||
public const MAP = [
|
||||
'type' => ASN1::TYPE_SEQUENCE,
|
||||
'children' => [
|
||||
'issuerName' => ['optional' => true] + GeneralNames::MAP,
|
||||
'baseCertificateID' => [
|
||||
'constant' => 0,
|
||||
'optional' => true,
|
||||
] + IssuerSerial::MAP,
|
||||
'objectDigestInfo' => [
|
||||
'constant' => 1,
|
||||
'optional' => true,
|
||||
] + ObjectDigestInfo::MAP,
|
||||
],
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user