From 5f60f964870ea382ba6124c832d9ec78e9a251b8 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sun, 27 Feb 2022 00:36:32 -0600 Subject: [PATCH] File/ASN1/Maps: CS adjustments these are mostly backported from PR#1754. the only modified files from that PR are: - RSAPrivateKey - OtherPrimeInfo --- .../File/ASN1/Maps/AccessDescription.php | 4 +- .../ASN1/Maps/AdministrationDomainName.php | 8 +- .../File/ASN1/Maps/AlgorithmIdentifier.php | 6 +- phpseclib/File/ASN1/Maps/AnotherName.php | 16 +-- phpseclib/File/ASN1/Maps/Attribute.php | 10 +- .../File/ASN1/Maps/AttributeTypeAndValue.php | 2 +- phpseclib/File/ASN1/Maps/Attributes.php | 6 +- .../ASN1/Maps/AuthorityInfoAccessSyntax.php | 6 +- .../File/ASN1/Maps/AuthorityKeyIdentifier.php | 30 +++--- phpseclib/File/ASN1/Maps/BasicConstraints.php | 18 ++-- .../Maps/BuiltInDomainDefinedAttribute.php | 6 +- .../Maps/BuiltInDomainDefinedAttributes.php | 6 +- .../ASN1/Maps/BuiltInStandardAttributes.php | 74 ++++++------- .../File/ASN1/Maps/CRLDistributionPoints.php | 6 +- phpseclib/File/ASN1/Maps/CRLReason.php | 22 ++-- phpseclib/File/ASN1/Maps/Certificate.php | 8 +- phpseclib/File/ASN1/Maps/CertificateList.php | 6 +- .../File/ASN1/Maps/CertificatePolicies.php | 6 +- .../File/ASN1/Maps/CertificationRequest.php | 6 +- .../ASN1/Maps/CertificationRequestInfo.php | 22 ++-- phpseclib/File/ASN1/Maps/CountryName.php | 8 +- phpseclib/File/ASN1/Maps/DHParameter.php | 2 +- phpseclib/File/ASN1/Maps/DigestInfo.php | 2 +- phpseclib/File/ASN1/Maps/DirectoryString.php | 8 +- phpseclib/File/ASN1/Maps/DisplayText.php | 8 +- .../File/ASN1/Maps/DistributionPoint.php | 30 +++--- .../File/ASN1/Maps/DistributionPointName.php | 20 ++-- phpseclib/File/ASN1/Maps/DssSigValue.php | 2 +- phpseclib/File/ASN1/Maps/ECParameters.php | 2 +- phpseclib/File/ASN1/Maps/EDIPartyName.php | 26 ++--- phpseclib/File/ASN1/Maps/EcdsaSigValue.php | 2 +- .../ASN1/Maps/EncryptedPrivateKeyInfo.php | 4 +- .../File/ASN1/Maps/ExtKeyUsageSyntax.php | 6 +- phpseclib/File/ASN1/Maps/Extension.php | 12 +-- .../File/ASN1/Maps/ExtensionAttribute.php | 26 ++--- .../File/ASN1/Maps/ExtensionAttributes.php | 6 +- phpseclib/File/ASN1/Maps/Extensions.php | 6 +- phpseclib/File/ASN1/Maps/GeneralName.php | 100 +++++++++--------- phpseclib/File/ASN1/Maps/GeneralNames.php | 6 +- phpseclib/File/ASN1/Maps/GeneralSubtree.php | 22 ++-- phpseclib/File/ASN1/Maps/GeneralSubtrees.php | 6 +- .../ASN1/Maps/IssuingDistributionPoint.php | 76 ++++++------- phpseclib/File/ASN1/Maps/KeyUsage.php | 2 +- phpseclib/File/ASN1/Maps/Name.php | 2 +- phpseclib/File/ASN1/Maps/NameConstraints.php | 20 ++-- phpseclib/File/ASN1/Maps/NoticeReference.php | 14 +-- phpseclib/File/ASN1/Maps/ORAddress.php | 8 +- phpseclib/File/ASN1/Maps/OneAsymmetricKey.php | 2 +- .../ASN1/Maps/OrganizationalUnitNames.php | 6 +- phpseclib/File/ASN1/Maps/OtherPrimeInfo.php | 6 +- phpseclib/File/ASN1/Maps/PBEParameter.php | 2 +- phpseclib/File/ASN1/Maps/PBES2params.php | 2 +- phpseclib/File/ASN1/Maps/PBKDF2params.php | 4 +- phpseclib/File/ASN1/Maps/PBMAC1params.php | 2 +- phpseclib/File/ASN1/Maps/PKCS9String.php | 4 +- phpseclib/File/ASN1/Maps/Pentanomial.php | 6 +- phpseclib/File/ASN1/Maps/PersonalName.php | 48 ++++----- .../File/ASN1/Maps/PolicyInformation.php | 14 +-- phpseclib/File/ASN1/Maps/PolicyMappings.php | 18 ++-- .../File/ASN1/Maps/PolicyQualifierInfo.php | 4 +- phpseclib/File/ASN1/Maps/PostalAddress.php | 6 +- .../File/ASN1/Maps/PrivateDomainName.php | 4 +- phpseclib/File/ASN1/Maps/PrivateKeyInfo.php | 2 +- .../File/ASN1/Maps/PrivateKeyUsagePeriod.php | 20 ++-- .../File/ASN1/Maps/PublicKeyAndChallenge.php | 4 +- phpseclib/File/ASN1/Maps/PublicKeyInfo.php | 2 +- phpseclib/File/ASN1/Maps/RC2CBCParameter.php | 4 +- phpseclib/File/ASN1/Maps/RDNSequence.php | 6 +- phpseclib/File/ASN1/Maps/RSAPrivateKey.php | 14 +-- phpseclib/File/ASN1/Maps/RSAPublicKey.php | 4 +- .../File/ASN1/Maps/RSASSA_PSS_params.php | 16 +-- phpseclib/File/ASN1/Maps/ReasonFlags.php | 2 +- .../ASN1/Maps/RelativeDistinguishedName.php | 6 +- .../File/ASN1/Maps/RevokedCertificate.php | 14 +-- .../ASN1/Maps/SignedPublicKeyAndChallenge.php | 6 +- .../File/ASN1/Maps/SpecifiedECDomain.php | 2 +- .../ASN1/Maps/SubjectDirectoryAttributes.php | 6 +- .../ASN1/Maps/SubjectInfoAccessSyntax.php | 6 +- .../File/ASN1/Maps/SubjectPublicKeyInfo.php | 4 +- phpseclib/File/ASN1/Maps/TBSCertList.php | 48 ++++----- phpseclib/File/ASN1/Maps/TBSCertificate.php | 58 +++++----- phpseclib/File/ASN1/Maps/Time.php | 4 +- phpseclib/File/ASN1/Maps/UserNotice.php | 16 +-- phpseclib/File/ASN1/Maps/Validity.php | 4 +- .../File/ASN1/Maps/netscape_cert_type.php | 2 +- 85 files changed, 536 insertions(+), 536 deletions(-) diff --git a/phpseclib/File/ASN1/Maps/AccessDescription.php b/phpseclib/File/ASN1/Maps/AccessDescription.php index 969de8c4..f58f91c7 100644 --- a/phpseclib/File/ASN1/Maps/AccessDescription.php +++ b/phpseclib/File/ASN1/Maps/AccessDescription.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class AccessDescription { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'accessMethod' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER], + 'accessMethod' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER], 'accessLocation' => GeneralName::MAP ] ]; diff --git a/phpseclib/File/ASN1/Maps/AdministrationDomainName.php b/phpseclib/File/ASN1/Maps/AdministrationDomainName.php index 1b607e7c..7a9925ec 100644 --- a/phpseclib/File/ASN1/Maps/AdministrationDomainName.php +++ b/phpseclib/File/ASN1/Maps/AdministrationDomainName.php @@ -27,13 +27,13 @@ use phpseclib3\File\ASN1; abstract class AdministrationDomainName { const MAP = [ - 'type' => ASN1::TYPE_CHOICE, + 'type' => ASN1::TYPE_CHOICE, // if class isn't present it's assumed to be \phpseclib3\File\ASN1::CLASS_UNIVERSAL or // (if constant is present) \phpseclib3\File\ASN1::CLASS_CONTEXT_SPECIFIC - 'class' => ASN1::CLASS_APPLICATION, - 'cast' => 2, + 'class' => ASN1::CLASS_APPLICATION, + 'cast' => 2, 'children' => [ - 'numeric' => ['type' => ASN1::TYPE_NUMERIC_STRING], + 'numeric' => ['type' => ASN1::TYPE_NUMERIC_STRING], 'printable' => ['type' => ASN1::TYPE_PRINTABLE_STRING] ] ]; diff --git a/phpseclib/File/ASN1/Maps/AlgorithmIdentifier.php b/phpseclib/File/ASN1/Maps/AlgorithmIdentifier.php index f9f25334..250019db 100644 --- a/phpseclib/File/ASN1/Maps/AlgorithmIdentifier.php +++ b/phpseclib/File/ASN1/Maps/AlgorithmIdentifier.php @@ -29,11 +29,11 @@ abstract class AlgorithmIdentifier const MAP = [ 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'algorithm' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER], + 'algorithm' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER], 'parameters' => [ - 'type' => ASN1::TYPE_ANY, + 'type' => ASN1::TYPE_ANY, 'optional' => true - ] + ] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/AnotherName.php b/phpseclib/File/ASN1/Maps/AnotherName.php index 3fe2ba0b..ee6b15c8 100644 --- a/phpseclib/File/ASN1/Maps/AnotherName.php +++ b/phpseclib/File/ASN1/Maps/AnotherName.php @@ -27,15 +27,15 @@ use phpseclib3\File\ASN1; abstract class AnotherName { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'type-id' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER], - 'value' => [ - 'type' => ASN1::TYPE_ANY, - 'constant' => 0, - 'optional' => true, - 'explicit' => true - ] + 'type-id' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER], + 'value' => [ + 'type' => ASN1::TYPE_ANY, + 'constant' => 0, + 'optional' => true, + 'explicit' => true + ] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/Attribute.php b/phpseclib/File/ASN1/Maps/Attribute.php index 5e8f2614..2209d831 100644 --- a/phpseclib/File/ASN1/Maps/Attribute.php +++ b/phpseclib/File/ASN1/Maps/Attribute.php @@ -27,14 +27,14 @@ use phpseclib3\File\ASN1; abstract class Attribute { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'type' => AttributeType::MAP, 'value' => [ - 'type' => ASN1::TYPE_SET, - 'min' => 1, - 'max' => -1, - 'children' => AttributeValue::MAP + 'type' => ASN1::TYPE_SET, + 'min' => 1, + 'max' => -1, + 'children' => AttributeValue::MAP ] ] ]; diff --git a/phpseclib/File/ASN1/Maps/AttributeTypeAndValue.php b/phpseclib/File/ASN1/Maps/AttributeTypeAndValue.php index da825d0b..ba7ea3cf 100644 --- a/phpseclib/File/ASN1/Maps/AttributeTypeAndValue.php +++ b/phpseclib/File/ASN1/Maps/AttributeTypeAndValue.php @@ -27,7 +27,7 @@ use phpseclib3\File\ASN1; abstract class AttributeTypeAndValue { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'type' => AttributeType::MAP, 'value' => AttributeValue::MAP diff --git a/phpseclib/File/ASN1/Maps/Attributes.php b/phpseclib/File/ASN1/Maps/Attributes.php index 563a6900..87ebc36e 100644 --- a/phpseclib/File/ASN1/Maps/Attributes.php +++ b/phpseclib/File/ASN1/Maps/Attributes.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class Attributes { const MAP = [ - 'type' => ASN1::TYPE_SET, - 'min' => 1, - 'max' => -1, + 'type' => ASN1::TYPE_SET, + 'min' => 1, + 'max' => -1, 'children' => Attribute::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/AuthorityInfoAccessSyntax.php b/phpseclib/File/ASN1/Maps/AuthorityInfoAccessSyntax.php index 38c714d5..2c975050 100644 --- a/phpseclib/File/ASN1/Maps/AuthorityInfoAccessSyntax.php +++ b/phpseclib/File/ASN1/Maps/AuthorityInfoAccessSyntax.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class AuthorityInfoAccessSyntax { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => -1, + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => -1, 'children' => AccessDescription::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/AuthorityKeyIdentifier.php b/phpseclib/File/ASN1/Maps/AuthorityKeyIdentifier.php index b6b08ae0..65c73214 100644 --- a/phpseclib/File/ASN1/Maps/AuthorityKeyIdentifier.php +++ b/phpseclib/File/ASN1/Maps/AuthorityKeyIdentifier.php @@ -27,23 +27,23 @@ use phpseclib3\File\ASN1; abstract class AuthorityKeyIdentifier { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'keyIdentifier' => [ - 'constant' => 0, - 'optional' => true, - 'implicit' => true - ] + KeyIdentifier::MAP, - 'authorityCertIssuer' => [ - 'constant' => 1, - 'optional' => true, - 'implicit' => true - ] + GeneralNames::MAP, + 'keyIdentifier' => [ + 'constant' => 0, + 'optional' => true, + 'implicit' => true + ] + KeyIdentifier::MAP, + 'authorityCertIssuer' => [ + 'constant' => 1, + 'optional' => true, + 'implicit' => true + ] + GeneralNames::MAP, 'authorityCertSerialNumber' => [ - 'constant' => 2, - 'optional' => true, - 'implicit' => true - ] + CertificateSerialNumber::MAP + 'constant' => 2, + 'optional' => true, + 'implicit' => true + ] + CertificateSerialNumber::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/BasicConstraints.php b/phpseclib/File/ASN1/Maps/BasicConstraints.php index 490bc920..241a736f 100644 --- a/phpseclib/File/ASN1/Maps/BasicConstraints.php +++ b/phpseclib/File/ASN1/Maps/BasicConstraints.php @@ -27,17 +27,17 @@ use phpseclib3\File\ASN1; abstract class BasicConstraints { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'cA' => [ - 'type' => ASN1::TYPE_BOOLEAN, - 'optional' => true, - 'default' => false - ], + 'cA' => [ + 'type' => ASN1::TYPE_BOOLEAN, + 'optional' => true, + 'default' => false + ], 'pathLenConstraint' => [ - 'type' => ASN1::TYPE_INTEGER, - 'optional' => true - ] + 'type' => ASN1::TYPE_INTEGER, + 'optional' => true + ] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttribute.php b/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttribute.php index 19f31c24..4a5fe533 100644 --- a/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttribute.php +++ b/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttribute.php @@ -27,10 +27,10 @@ use phpseclib3\File\ASN1; abstract class BuiltInDomainDefinedAttribute { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'type' => ['type' => ASN1::TYPE_PRINTABLE_STRING], - 'value' => ['type' => ASN1::TYPE_PRINTABLE_STRING] + 'type' => ['type' => ASN1::TYPE_PRINTABLE_STRING], + 'value' => ['type' => ASN1::TYPE_PRINTABLE_STRING] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttributes.php b/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttributes.php index dc412118..ae5b5ef7 100644 --- a/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttributes.php +++ b/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttributes.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class BuiltInDomainDefinedAttributes { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => 4, // ub-domain-defined-attributes + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => 4, // ub-domain-defined-attributes 'children' => BuiltInDomainDefinedAttribute::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/BuiltInStandardAttributes.php b/phpseclib/File/ASN1/Maps/BuiltInStandardAttributes.php index 4cbe0b09..6f02b86b 100644 --- a/phpseclib/File/ASN1/Maps/BuiltInStandardAttributes.php +++ b/phpseclib/File/ASN1/Maps/BuiltInStandardAttributes.php @@ -27,45 +27,45 @@ use phpseclib3\File\ASN1; abstract class BuiltInStandardAttributes { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'country-name' => ['optional' => true] + CountryName::MAP, + 'country-name' => ['optional' => true] + CountryName::MAP, 'administration-domain-name' => ['optional' => true] + AdministrationDomainName::MAP, - 'network-address' => [ - 'constant' => 0, - 'optional' => true, - 'implicit' => true - ] + NetworkAddress::MAP, - 'terminal-identifier' => [ - 'constant' => 1, - 'optional' => true, - 'implicit' => true - ] + TerminalIdentifier::MAP, - 'private-domain-name' => [ - 'constant' => 2, - 'optional' => true, - 'explicit' => true - ] + PrivateDomainName::MAP, - 'organization-name' => [ - 'constant' => 3, - 'optional' => true, - 'implicit' => true - ] + OrganizationName::MAP, - 'numeric-user-identifier' => [ - 'constant' => 4, - 'optional' => true, - 'implicit' => true - ] + NumericUserIdentifier::MAP, - 'personal-name' => [ - 'constant' => 5, - 'optional' => true, - 'implicit' => true - ] + PersonalName::MAP, - 'organizational-unit-names' => [ - 'constant' => 6, - 'optional' => true, - 'implicit' => true - ] + OrganizationalUnitNames::MAP + 'network-address' => [ + 'constant' => 0, + 'optional' => true, + 'implicit' => true + ] + NetworkAddress::MAP, + 'terminal-identifier' => [ + 'constant' => 1, + 'optional' => true, + 'implicit' => true + ] + TerminalIdentifier::MAP, + 'private-domain-name' => [ + 'constant' => 2, + 'optional' => true, + 'explicit' => true + ] + PrivateDomainName::MAP, + 'organization-name' => [ + 'constant' => 3, + 'optional' => true, + 'implicit' => true + ] + OrganizationName::MAP, + 'numeric-user-identifier' => [ + 'constant' => 4, + 'optional' => true, + 'implicit' => true + ] + NumericUserIdentifier::MAP, + 'personal-name' => [ + 'constant' => 5, + 'optional' => true, + 'implicit' => true + ] + PersonalName::MAP, + 'organizational-unit-names' => [ + 'constant' => 6, + 'optional' => true, + 'implicit' => true + ] + OrganizationalUnitNames::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/CRLDistributionPoints.php b/phpseclib/File/ASN1/Maps/CRLDistributionPoints.php index 21ab6623..d157388b 100644 --- a/phpseclib/File/ASN1/Maps/CRLDistributionPoints.php +++ b/phpseclib/File/ASN1/Maps/CRLDistributionPoints.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class CRLDistributionPoints { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => -1, + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => -1, 'children' => DistributionPoint::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/CRLReason.php b/phpseclib/File/ASN1/Maps/CRLReason.php index e43e4dd7..c7e992c7 100644 --- a/phpseclib/File/ASN1/Maps/CRLReason.php +++ b/phpseclib/File/ASN1/Maps/CRLReason.php @@ -29,17 +29,17 @@ abstract class CRLReason const MAP = [ 'type' => ASN1::TYPE_ENUMERATED, 'mapping' => [ - 'unspecified', - 'keyCompromise', - 'cACompromise', - 'affiliationChanged', - 'superseded', - 'cessationOfOperation', - 'certificateHold', - // Value 7 is not used. - 8 => 'removeFromCRL', - 'privilegeWithdrawn', - 'aACompromise' + 'unspecified', + 'keyCompromise', + 'cACompromise', + 'affiliationChanged', + 'superseded', + 'cessationOfOperation', + 'certificateHold', + // Value 7 is not used. + 8 => 'removeFromCRL', + 'privilegeWithdrawn', + 'aACompromise' ] ]; } diff --git a/phpseclib/File/ASN1/Maps/Certificate.php b/phpseclib/File/ASN1/Maps/Certificate.php index f8ff4130..06b0cc44 100644 --- a/phpseclib/File/ASN1/Maps/Certificate.php +++ b/phpseclib/File/ASN1/Maps/Certificate.php @@ -27,11 +27,11 @@ use phpseclib3\File\ASN1; abstract class Certificate { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'tbsCertificate' => TBSCertificate::MAP, - 'signatureAlgorithm' => AlgorithmIdentifier::MAP, - 'signature' => ['type' => ASN1::TYPE_BIT_STRING] + 'tbsCertificate' => TBSCertificate::MAP, + 'signatureAlgorithm' => AlgorithmIdentifier::MAP, + 'signature' => ['type' => ASN1::TYPE_BIT_STRING] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/CertificateList.php b/phpseclib/File/ASN1/Maps/CertificateList.php index 79a1f324..11330660 100644 --- a/phpseclib/File/ASN1/Maps/CertificateList.php +++ b/phpseclib/File/ASN1/Maps/CertificateList.php @@ -27,11 +27,11 @@ use phpseclib3\File\ASN1; abstract class CertificateList { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'tbsCertList' => TBSCertList::MAP, + 'tbsCertList' => TBSCertList::MAP, 'signatureAlgorithm' => AlgorithmIdentifier::MAP, - 'signature' => ['type' => ASN1::TYPE_BIT_STRING] + 'signature' => ['type' => ASN1::TYPE_BIT_STRING] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/CertificatePolicies.php b/phpseclib/File/ASN1/Maps/CertificatePolicies.php index e9f9354a..292f8c6b 100644 --- a/phpseclib/File/ASN1/Maps/CertificatePolicies.php +++ b/phpseclib/File/ASN1/Maps/CertificatePolicies.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class CertificatePolicies { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => -1, + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => -1, 'children' => PolicyInformation::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/CertificationRequest.php b/phpseclib/File/ASN1/Maps/CertificationRequest.php index 23587f08..68750b87 100644 --- a/phpseclib/File/ASN1/Maps/CertificationRequest.php +++ b/phpseclib/File/ASN1/Maps/CertificationRequest.php @@ -27,11 +27,11 @@ use phpseclib3\File\ASN1; abstract class CertificationRequest { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'certificationRequestInfo' => CertificationRequestInfo::MAP, - 'signatureAlgorithm' => AlgorithmIdentifier::MAP, - 'signature' => ['type' => ASN1::TYPE_BIT_STRING] + 'signatureAlgorithm' => AlgorithmIdentifier::MAP, + 'signature' => ['type' => ASN1::TYPE_BIT_STRING] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/CertificationRequestInfo.php b/phpseclib/File/ASN1/Maps/CertificationRequestInfo.php index 1ebff5ff..752cf65c 100644 --- a/phpseclib/File/ASN1/Maps/CertificationRequestInfo.php +++ b/phpseclib/File/ASN1/Maps/CertificationRequestInfo.php @@ -27,19 +27,19 @@ use phpseclib3\File\ASN1; abstract class CertificationRequestInfo { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'version' => [ - 'type' => ASN1::TYPE_INTEGER, - 'mapping' => ['v1'] - ], - 'subject' => Name::MAP, + 'version' => [ + 'type' => ASN1::TYPE_INTEGER, + 'mapping' => ['v1'] + ], + 'subject' => Name::MAP, 'subjectPKInfo' => SubjectPublicKeyInfo::MAP, - 'attributes' => [ - 'constant' => 0, - 'optional' => true, - 'implicit' => true - ] + Attributes::MAP, + 'attributes' => [ + 'constant' => 0, + 'optional' => true, + 'implicit' => true + ] + Attributes::MAP, ] ]; } diff --git a/phpseclib/File/ASN1/Maps/CountryName.php b/phpseclib/File/ASN1/Maps/CountryName.php index 83b3a2c3..afff9927 100644 --- a/phpseclib/File/ASN1/Maps/CountryName.php +++ b/phpseclib/File/ASN1/Maps/CountryName.php @@ -27,13 +27,13 @@ use phpseclib3\File\ASN1; abstract class CountryName { const MAP = [ - 'type' => ASN1::TYPE_CHOICE, + 'type' => ASN1::TYPE_CHOICE, // if class isn't present it's assumed to be \phpseclib3\File\ASN1::CLASS_UNIVERSAL or // (if constant is present) \phpseclib3\File\ASN1::CLASS_CONTEXT_SPECIFIC - 'class' => ASN1::CLASS_APPLICATION, - 'cast' => 1, + 'class' => ASN1::CLASS_APPLICATION, + 'cast' => 1, 'children' => [ - 'x121-dcc-code' => ['type' => ASN1::TYPE_NUMERIC_STRING], + 'x121-dcc-code' => ['type' => ASN1::TYPE_NUMERIC_STRING], 'iso-3166-alpha2-code' => ['type' => ASN1::TYPE_PRINTABLE_STRING] ] ]; diff --git a/phpseclib/File/ASN1/Maps/DHParameter.php b/phpseclib/File/ASN1/Maps/DHParameter.php index 8edd9d06..3e929321 100644 --- a/phpseclib/File/ASN1/Maps/DHParameter.php +++ b/phpseclib/File/ASN1/Maps/DHParameter.php @@ -32,7 +32,7 @@ abstract class DHParameter 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'prime' => ['type' => ASN1::TYPE_INTEGER], - 'base' => ['type' => ASN1::TYPE_INTEGER], + 'base' => ['type' => ASN1::TYPE_INTEGER], 'privateValueLength' => [ 'type' => ASN1::TYPE_INTEGER, 'optional' => true diff --git a/phpseclib/File/ASN1/Maps/DigestInfo.php b/phpseclib/File/ASN1/Maps/DigestInfo.php index 828c2798..5fe7b9f0 100644 --- a/phpseclib/File/ASN1/Maps/DigestInfo.php +++ b/phpseclib/File/ASN1/Maps/DigestInfo.php @@ -29,7 +29,7 @@ use phpseclib3\File\ASN1; abstract class DigestInfo { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'digestAlgorithm' => AlgorithmIdentifier::MAP, 'digest' => ['type' => ASN1::TYPE_OCTET_STRING] diff --git a/phpseclib/File/ASN1/Maps/DirectoryString.php b/phpseclib/File/ASN1/Maps/DirectoryString.php index 458acab1..544fbb3e 100644 --- a/phpseclib/File/ASN1/Maps/DirectoryString.php +++ b/phpseclib/File/ASN1/Maps/DirectoryString.php @@ -27,13 +27,13 @@ use phpseclib3\File\ASN1; abstract class DirectoryString { const MAP = [ - 'type' => ASN1::TYPE_CHOICE, + 'type' => ASN1::TYPE_CHOICE, 'children' => [ - 'teletexString' => ['type' => ASN1::TYPE_TELETEX_STRING], + 'teletexString' => ['type' => ASN1::TYPE_TELETEX_STRING], 'printableString' => ['type' => ASN1::TYPE_PRINTABLE_STRING], 'universalString' => ['type' => ASN1::TYPE_UNIVERSAL_STRING], - 'utf8String' => ['type' => ASN1::TYPE_UTF8_STRING], - 'bmpString' => ['type' => ASN1::TYPE_BMP_STRING] + 'utf8String' => ['type' => ASN1::TYPE_UTF8_STRING], + 'bmpString' => ['type' => ASN1::TYPE_BMP_STRING] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/DisplayText.php b/phpseclib/File/ASN1/Maps/DisplayText.php index 6c88b41c..b00ade88 100644 --- a/phpseclib/File/ASN1/Maps/DisplayText.php +++ b/phpseclib/File/ASN1/Maps/DisplayText.php @@ -27,12 +27,12 @@ use phpseclib3\File\ASN1; abstract class DisplayText { const MAP = [ - 'type' => ASN1::TYPE_CHOICE, + 'type' => ASN1::TYPE_CHOICE, 'children' => [ - 'ia5String' => ['type' => ASN1::TYPE_IA5_STRING], + 'ia5String' => ['type' => ASN1::TYPE_IA5_STRING], 'visibleString' => ['type' => ASN1::TYPE_VISIBLE_STRING], - 'bmpString' => ['type' => ASN1::TYPE_BMP_STRING], - 'utf8String' => ['type' => ASN1::TYPE_UTF8_STRING] + 'bmpString' => ['type' => ASN1::TYPE_BMP_STRING], + 'utf8String' => ['type' => ASN1::TYPE_UTF8_STRING] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/DistributionPoint.php b/phpseclib/File/ASN1/Maps/DistributionPoint.php index 91b3feef..f8563a1c 100644 --- a/phpseclib/File/ASN1/Maps/DistributionPoint.php +++ b/phpseclib/File/ASN1/Maps/DistributionPoint.php @@ -27,23 +27,23 @@ use phpseclib3\File\ASN1; abstract class DistributionPoint { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'distributionPoint' => [ - 'constant' => 0, - 'optional' => true, - 'explicit' => true - ] + DistributionPointName::MAP, - 'reasons' => [ - 'constant' => 1, - 'optional' => true, - 'implicit' => true - ] + ReasonFlags::MAP, - 'cRLIssuer' => [ - 'constant' => 2, - 'optional' => true, - 'implicit' => true - ] + GeneralNames::MAP + 'constant' => 0, + 'optional' => true, + 'explicit' => true + ] + DistributionPointName::MAP, + 'reasons' => [ + 'constant' => 1, + 'optional' => true, + 'implicit' => true + ] + ReasonFlags::MAP, + 'cRLIssuer' => [ + 'constant' => 2, + 'optional' => true, + 'implicit' => true + ] + GeneralNames::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/DistributionPointName.php b/phpseclib/File/ASN1/Maps/DistributionPointName.php index fc157bca..914848ca 100644 --- a/phpseclib/File/ASN1/Maps/DistributionPointName.php +++ b/phpseclib/File/ASN1/Maps/DistributionPointName.php @@ -27,18 +27,18 @@ use phpseclib3\File\ASN1; abstract class DistributionPointName { const MAP = [ - 'type' => ASN1::TYPE_CHOICE, + 'type' => ASN1::TYPE_CHOICE, 'children' => [ - 'fullName' => [ - 'constant' => 0, - 'optional' => true, - 'implicit' => true - ] + GeneralNames::MAP, + 'fullName' => [ + 'constant' => 0, + 'optional' => true, + 'implicit' => true + ] + GeneralNames::MAP, 'nameRelativeToCRLIssuer' => [ - 'constant' => 1, - 'optional' => true, - 'implicit' => true - ] + RelativeDistinguishedName::MAP + 'constant' => 1, + 'optional' => true, + 'implicit' => true + ] + RelativeDistinguishedName::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/DssSigValue.php b/phpseclib/File/ASN1/Maps/DssSigValue.php index 1bffe925..c8743945 100644 --- a/phpseclib/File/ASN1/Maps/DssSigValue.php +++ b/phpseclib/File/ASN1/Maps/DssSigValue.php @@ -27,7 +27,7 @@ use phpseclib3\File\ASN1; abstract class DssSigValue { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'r' => ['type' => ASN1::TYPE_INTEGER], 's' => ['type' => ASN1::TYPE_INTEGER] diff --git a/phpseclib/File/ASN1/Maps/ECParameters.php b/phpseclib/File/ASN1/Maps/ECParameters.php index c27d16f9..2404f507 100644 --- a/phpseclib/File/ASN1/Maps/ECParameters.php +++ b/phpseclib/File/ASN1/Maps/ECParameters.php @@ -39,7 +39,7 @@ use phpseclib3\File\ASN1; abstract class ECParameters { const MAP = [ - 'type' => ASN1::TYPE_CHOICE, + 'type' => ASN1::TYPE_CHOICE, 'children' => [ 'namedCurve' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER], 'implicitCurve' => ['type' => ASN1::TYPE_NULL], diff --git a/phpseclib/File/ASN1/Maps/EDIPartyName.php b/phpseclib/File/ASN1/Maps/EDIPartyName.php index 0c2327b8..4420f30c 100644 --- a/phpseclib/File/ASN1/Maps/EDIPartyName.php +++ b/phpseclib/File/ASN1/Maps/EDIPartyName.php @@ -27,20 +27,20 @@ use phpseclib3\File\ASN1; abstract class EDIPartyName { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'nameAssigner' => [ - 'constant' => 0, - 'optional' => true, - 'implicit' => true - ] + DirectoryString::MAP, - // partyName is technically required but \phpseclib3\File\ASN1 doesn't currently support non-optional constants and - // setting it to optional gets the job done in any event. - 'partyName' => [ - 'constant' => 1, - 'optional' => true, - 'implicit' => true - ] + DirectoryString::MAP + 'nameAssigner' => [ + 'constant' => 0, + 'optional' => true, + 'implicit' => true + ] + DirectoryString::MAP, + // partyName is technically required but \phpseclib3\File\ASN1 doesn't currently support non-optional constants and + // setting it to optional gets the job done in any event. + 'partyName' => [ + 'constant' => 1, + 'optional' => true, + 'implicit' => true + ] + DirectoryString::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/EcdsaSigValue.php b/phpseclib/File/ASN1/Maps/EcdsaSigValue.php index 98dd965a..ea11ffc7 100644 --- a/phpseclib/File/ASN1/Maps/EcdsaSigValue.php +++ b/phpseclib/File/ASN1/Maps/EcdsaSigValue.php @@ -27,7 +27,7 @@ use phpseclib3\File\ASN1; abstract class EcdsaSigValue { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'r' => ['type' => ASN1::TYPE_INTEGER], 's' => ['type' => ASN1::TYPE_INTEGER] diff --git a/phpseclib/File/ASN1/Maps/EncryptedPrivateKeyInfo.php b/phpseclib/File/ASN1/Maps/EncryptedPrivateKeyInfo.php index 5d409eb1..a6702691 100644 --- a/phpseclib/File/ASN1/Maps/EncryptedPrivateKeyInfo.php +++ b/phpseclib/File/ASN1/Maps/EncryptedPrivateKeyInfo.php @@ -27,10 +27,10 @@ use phpseclib3\File\ASN1; abstract class EncryptedPrivateKeyInfo { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'encryptionAlgorithm' => AlgorithmIdentifier::MAP, - 'encryptedData' => EncryptedData::MAP + 'encryptedData' => EncryptedData::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/ExtKeyUsageSyntax.php b/phpseclib/File/ASN1/Maps/ExtKeyUsageSyntax.php index c61116df..3a682d05 100644 --- a/phpseclib/File/ASN1/Maps/ExtKeyUsageSyntax.php +++ b/phpseclib/File/ASN1/Maps/ExtKeyUsageSyntax.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class ExtKeyUsageSyntax { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => -1, + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => -1, 'children' => KeyPurposeId::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/Extension.php b/phpseclib/File/ASN1/Maps/Extension.php index 39200793..25ce5ee8 100644 --- a/phpseclib/File/ASN1/Maps/Extension.php +++ b/phpseclib/File/ASN1/Maps/Extension.php @@ -33,14 +33,14 @@ use phpseclib3\File\ASN1; abstract class Extension { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'extnId' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER], + 'extnId' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER], 'critical' => [ - 'type' => ASN1::TYPE_BOOLEAN, - 'optional' => true, - 'default' => false - ], + 'type' => ASN1::TYPE_BOOLEAN, + 'optional' => true, + 'default' => false + ], 'extnValue' => ['type' => ASN1::TYPE_OCTET_STRING] ] ]; diff --git a/phpseclib/File/ASN1/Maps/ExtensionAttribute.php b/phpseclib/File/ASN1/Maps/ExtensionAttribute.php index 6455e189..5af7e292 100644 --- a/phpseclib/File/ASN1/Maps/ExtensionAttribute.php +++ b/phpseclib/File/ASN1/Maps/ExtensionAttribute.php @@ -27,20 +27,20 @@ use phpseclib3\File\ASN1; abstract class ExtensionAttribute { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'extension-attribute-type' => [ - 'type' => ASN1::TYPE_PRINTABLE_STRING, - 'constant' => 0, - 'optional' => true, - 'implicit' => true - ], - 'extension-attribute-value' => [ - 'type' => ASN1::TYPE_ANY, - 'constant' => 1, - 'optional' => true, - 'explicit' => true - ] + 'extension-attribute-type' => [ + 'type' => ASN1::TYPE_PRINTABLE_STRING, + 'constant' => 0, + 'optional' => true, + 'implicit' => true + ], + 'extension-attribute-value' => [ + 'type' => ASN1::TYPE_ANY, + 'constant' => 1, + 'optional' => true, + 'explicit' => true + ] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/ExtensionAttributes.php b/phpseclib/File/ASN1/Maps/ExtensionAttributes.php index 047bb29a..c0126212 100644 --- a/phpseclib/File/ASN1/Maps/ExtensionAttributes.php +++ b/phpseclib/File/ASN1/Maps/ExtensionAttributes.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class ExtensionAttributes { const MAP = [ - 'type' => ASN1::TYPE_SET, - 'min' => 1, - 'max' => 256, // ub-extension-attributes + 'type' => ASN1::TYPE_SET, + 'min' => 1, + 'max' => 256, // ub-extension-attributes 'children' => ExtensionAttribute::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/Extensions.php b/phpseclib/File/ASN1/Maps/Extensions.php index e3d528d4..37fd5445 100644 --- a/phpseclib/File/ASN1/Maps/Extensions.php +++ b/phpseclib/File/ASN1/Maps/Extensions.php @@ -27,10 +27,10 @@ use phpseclib3\File\ASN1; abstract class Extensions { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, // technically, it's MAX, but we'll assume anything < 0 is MAX - 'max' => -1, + 'max' => -1, // if 'children' isn't an array then 'min' and 'max' must be defined 'children' => Extension::MAP ]; diff --git a/phpseclib/File/ASN1/Maps/GeneralName.php b/phpseclib/File/ASN1/Maps/GeneralName.php index ba0b9e48..ecf45164 100644 --- a/phpseclib/File/ASN1/Maps/GeneralName.php +++ b/phpseclib/File/ASN1/Maps/GeneralName.php @@ -27,58 +27,58 @@ use phpseclib3\File\ASN1; abstract class GeneralName { const MAP = [ - 'type' => ASN1::TYPE_CHOICE, + 'type' => ASN1::TYPE_CHOICE, 'children' => [ - 'otherName' => [ - 'constant' => 0, - 'optional' => true, - 'implicit' => true - ] + AnotherName::MAP, - 'rfc822Name' => [ - 'type' => ASN1::TYPE_IA5_STRING, - 'constant' => 1, - 'optional' => true, - 'implicit' => true - ], - 'dNSName' => [ - 'type' => ASN1::TYPE_IA5_STRING, - 'constant' => 2, - 'optional' => true, - 'implicit' => true - ], - 'x400Address' => [ - 'constant' => 3, - 'optional' => true, - 'implicit' => true - ] + ORAddress::MAP, - 'directoryName' => [ - 'constant' => 4, - 'optional' => true, - 'explicit' => true - ] + Name::MAP, - 'ediPartyName' => [ - 'constant' => 5, - 'optional' => true, - 'implicit' => true - ] + EDIPartyName::MAP, + 'otherName' => [ + 'constant' => 0, + 'optional' => true, + 'implicit' => true + ] + AnotherName::MAP, + 'rfc822Name' => [ + 'type' => ASN1::TYPE_IA5_STRING, + 'constant' => 1, + 'optional' => true, + 'implicit' => true + ], + 'dNSName' => [ + 'type' => ASN1::TYPE_IA5_STRING, + 'constant' => 2, + 'optional' => true, + 'implicit' => true + ], + 'x400Address' => [ + 'constant' => 3, + 'optional' => true, + 'implicit' => true + ] + ORAddress::MAP, + 'directoryName' => [ + 'constant' => 4, + 'optional' => true, + 'explicit' => true + ] + Name::MAP, + 'ediPartyName' => [ + 'constant' => 5, + 'optional' => true, + 'implicit' => true + ] + EDIPartyName::MAP, 'uniformResourceIdentifier' => [ - 'type' => ASN1::TYPE_IA5_STRING, - 'constant' => 6, - 'optional' => true, - 'implicit' => true - ], - 'iPAddress' => [ - 'type' => ASN1::TYPE_OCTET_STRING, - 'constant' => 7, - 'optional' => true, - 'implicit' => true - ], - 'registeredID' => [ - 'type' => ASN1::TYPE_OBJECT_IDENTIFIER, - 'constant' => 8, - 'optional' => true, - 'implicit' => true - ] + 'type' => ASN1::TYPE_IA5_STRING, + 'constant' => 6, + 'optional' => true, + 'implicit' => true + ], + 'iPAddress' => [ + 'type' => ASN1::TYPE_OCTET_STRING, + 'constant' => 7, + 'optional' => true, + 'implicit' => true + ], + 'registeredID' => [ + 'type' => ASN1::TYPE_OBJECT_IDENTIFIER, + 'constant' => 8, + 'optional' => true, + 'implicit' => true + ] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/GeneralNames.php b/phpseclib/File/ASN1/Maps/GeneralNames.php index c8a3c89b..142940d6 100644 --- a/phpseclib/File/ASN1/Maps/GeneralNames.php +++ b/phpseclib/File/ASN1/Maps/GeneralNames.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class GeneralNames { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => -1, + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => -1, 'children' => GeneralName::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/GeneralSubtree.php b/phpseclib/File/ASN1/Maps/GeneralSubtree.php index 15d95430..1649bd33 100644 --- a/phpseclib/File/ASN1/Maps/GeneralSubtree.php +++ b/phpseclib/File/ASN1/Maps/GeneralSubtree.php @@ -27,20 +27,20 @@ use phpseclib3\File\ASN1; abstract class GeneralSubtree { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'base' => GeneralName::MAP, + 'base' => GeneralName::MAP, 'minimum' => [ - 'constant' => 0, - 'optional' => true, - 'implicit' => true, - 'default' => '0' - ] + BaseDistance::MAP, + 'constant' => 0, + 'optional' => true, + 'implicit' => true, + 'default' => '0' + ] + BaseDistance::MAP, 'maximum' => [ - 'constant' => 1, - 'optional' => true, - 'implicit' => true, - ] + BaseDistance::MAP + 'constant' => 1, + 'optional' => true, + 'implicit' => true, + ] + BaseDistance::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/GeneralSubtrees.php b/phpseclib/File/ASN1/Maps/GeneralSubtrees.php index 3b10265c..a0716cc9 100644 --- a/phpseclib/File/ASN1/Maps/GeneralSubtrees.php +++ b/phpseclib/File/ASN1/Maps/GeneralSubtrees.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class GeneralSubtrees { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => -1, + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => -1, 'children' => GeneralSubtree::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/IssuingDistributionPoint.php b/phpseclib/File/ASN1/Maps/IssuingDistributionPoint.php index a3a9c63c..0feeef40 100644 --- a/phpseclib/File/ASN1/Maps/IssuingDistributionPoint.php +++ b/phpseclib/File/ASN1/Maps/IssuingDistributionPoint.php @@ -29,44 +29,44 @@ abstract class IssuingDistributionPoint const MAP = [ 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'distributionPoint' => [ - 'constant' => 0, - 'optional' => true, - 'explicit' => true - ] + DistributionPointName::MAP, - 'onlyContainsUserCerts' => [ - 'type' => ASN1::TYPE_BOOLEAN, - 'constant' => 1, - 'optional' => true, - 'default' => false, - 'implicit' => true - ], - 'onlyContainsCACerts' => [ - 'type' => ASN1::TYPE_BOOLEAN, - 'constant' => 2, - 'optional' => true, - 'default' => false, - 'implicit' => true - ], - 'onlySomeReasons' => [ - 'constant' => 3, - 'optional' => true, - 'implicit' => true - ] + ReasonFlags::MAP, - 'indirectCRL' => [ - 'type' => ASN1::TYPE_BOOLEAN, - 'constant' => 4, - 'optional' => true, - 'default' => false, - 'implicit' => true - ], + 'distributionPoint' => [ + 'constant' => 0, + 'optional' => true, + 'explicit' => true + ] + DistributionPointName::MAP, + 'onlyContainsUserCerts' => [ + 'type' => ASN1::TYPE_BOOLEAN, + 'constant' => 1, + 'optional' => true, + 'default' => false, + 'implicit' => true + ], + 'onlyContainsCACerts' => [ + 'type' => ASN1::TYPE_BOOLEAN, + 'constant' => 2, + 'optional' => true, + 'default' => false, + 'implicit' => true + ], + 'onlySomeReasons' => [ + 'constant' => 3, + 'optional' => true, + 'implicit' => true + ] + ReasonFlags::MAP, + 'indirectCRL' => [ + 'type' => ASN1::TYPE_BOOLEAN, + 'constant' => 4, + 'optional' => true, + 'default' => false, + 'implicit' => true + ], 'onlyContainsAttributeCerts' => [ - 'type' => ASN1::TYPE_BOOLEAN, - 'constant' => 5, - 'optional' => true, - 'default' => false, - 'implicit' => true - ] - ] + 'type' => ASN1::TYPE_BOOLEAN, + 'constant' => 5, + 'optional' => true, + 'default' => false, + 'implicit' => true + ] + ] ]; } diff --git a/phpseclib/File/ASN1/Maps/KeyUsage.php b/phpseclib/File/ASN1/Maps/KeyUsage.php index abf599ed..1cacd745 100644 --- a/phpseclib/File/ASN1/Maps/KeyUsage.php +++ b/phpseclib/File/ASN1/Maps/KeyUsage.php @@ -27,7 +27,7 @@ use phpseclib3\File\ASN1; abstract class KeyUsage { const MAP = [ - 'type' => ASN1::TYPE_BIT_STRING, + 'type' => ASN1::TYPE_BIT_STRING, 'mapping' => [ 'digitalSignature', 'nonRepudiation', diff --git a/phpseclib/File/ASN1/Maps/Name.php b/phpseclib/File/ASN1/Maps/Name.php index a4ba82a0..d9a303bf 100644 --- a/phpseclib/File/ASN1/Maps/Name.php +++ b/phpseclib/File/ASN1/Maps/Name.php @@ -27,7 +27,7 @@ use phpseclib3\File\ASN1; abstract class Name { const MAP = [ - 'type' => ASN1::TYPE_CHOICE, + 'type' => ASN1::TYPE_CHOICE, 'children' => [ 'rdnSequence' => RDNSequence::MAP ] diff --git a/phpseclib/File/ASN1/Maps/NameConstraints.php b/phpseclib/File/ASN1/Maps/NameConstraints.php index 518e68f6..0196e9a1 100644 --- a/phpseclib/File/ASN1/Maps/NameConstraints.php +++ b/phpseclib/File/ASN1/Maps/NameConstraints.php @@ -27,18 +27,18 @@ use phpseclib3\File\ASN1; abstract class NameConstraints { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'permittedSubtrees' => [ - 'constant' => 0, - 'optional' => true, - 'implicit' => true - ] + GeneralSubtrees::MAP, - 'excludedSubtrees' => [ - 'constant' => 1, - 'optional' => true, - 'implicit' => true - ] + GeneralSubtrees::MAP + 'constant' => 0, + 'optional' => true, + 'implicit' => true + ] + GeneralSubtrees::MAP, + 'excludedSubtrees' => [ + 'constant' => 1, + 'optional' => true, + 'implicit' => true + ] + GeneralSubtrees::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/NoticeReference.php b/phpseclib/File/ASN1/Maps/NoticeReference.php index cea26773..5bb9b4f5 100644 --- a/phpseclib/File/ASN1/Maps/NoticeReference.php +++ b/phpseclib/File/ASN1/Maps/NoticeReference.php @@ -27,15 +27,15 @@ use phpseclib3\File\ASN1; abstract class NoticeReference { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'organization' => DisplayText::MAP, + 'organization' => DisplayText::MAP, 'noticeNumbers' => [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => 200, - 'children' => ['type' => ASN1::TYPE_INTEGER] - ] + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => 200, + 'children' => ['type' => ASN1::TYPE_INTEGER] + ] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/ORAddress.php b/phpseclib/File/ASN1/Maps/ORAddress.php index cde7b3d6..603cf929 100644 --- a/phpseclib/File/ASN1/Maps/ORAddress.php +++ b/phpseclib/File/ASN1/Maps/ORAddress.php @@ -27,11 +27,11 @@ use phpseclib3\File\ASN1; abstract class ORAddress { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'built-in-standard-attributes' => BuiltInStandardAttributes::MAP, - 'built-in-domain-defined-attributes' => ['optional' => true] + BuiltInDomainDefinedAttributes::MAP, - 'extension-attributes' => ['optional' => true] + ExtensionAttributes::MAP + 'built-in-standard-attributes' => BuiltInStandardAttributes::MAP, + 'built-in-domain-defined-attributes' => ['optional' => true] + BuiltInDomainDefinedAttributes::MAP, + 'extension-attributes' => ['optional' => true] + ExtensionAttributes::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/OneAsymmetricKey.php b/phpseclib/File/ASN1/Maps/OneAsymmetricKey.php index dbc7f839..c6d4b1cc 100644 --- a/phpseclib/File/ASN1/Maps/OneAsymmetricKey.php +++ b/phpseclib/File/ASN1/Maps/OneAsymmetricKey.php @@ -29,7 +29,7 @@ use phpseclib3\File\ASN1; abstract class OneAsymmetricKey { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'version' => [ 'type' => ASN1::TYPE_INTEGER, diff --git a/phpseclib/File/ASN1/Maps/OrganizationalUnitNames.php b/phpseclib/File/ASN1/Maps/OrganizationalUnitNames.php index eb2ac677..27d23442 100644 --- a/phpseclib/File/ASN1/Maps/OrganizationalUnitNames.php +++ b/phpseclib/File/ASN1/Maps/OrganizationalUnitNames.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class OrganizationalUnitNames { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => 4, // ub-organizational-units + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => 4, // ub-organizational-units 'children' => ['type' => ASN1::TYPE_PRINTABLE_STRING] ]; } diff --git a/phpseclib/File/ASN1/Maps/OtherPrimeInfo.php b/phpseclib/File/ASN1/Maps/OtherPrimeInfo.php index d75fa3f7..617a944d 100644 --- a/phpseclib/File/ASN1/Maps/OtherPrimeInfo.php +++ b/phpseclib/File/ASN1/Maps/OtherPrimeInfo.php @@ -30,9 +30,9 @@ abstract class OtherPrimeInfo const MAP = [ 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'prime' => ['type' => ASN1::TYPE_INTEGER], // ri - 'exponent' => ['type' => ASN1::TYPE_INTEGER], // di - 'coefficient' => ['type' => ASN1::TYPE_INTEGER] // ti + 'prime' => ['type' => ASN1::TYPE_INTEGER], // ri + 'exponent' => ['type' => ASN1::TYPE_INTEGER], // di + 'coefficient' => ['type' => ASN1::TYPE_INTEGER] // ti ] ]; } diff --git a/phpseclib/File/ASN1/Maps/PBEParameter.php b/phpseclib/File/ASN1/Maps/PBEParameter.php index bd17291f..9f6a635e 100644 --- a/phpseclib/File/ASN1/Maps/PBEParameter.php +++ b/phpseclib/File/ASN1/Maps/PBEParameter.php @@ -29,7 +29,7 @@ use phpseclib3\File\ASN1; abstract class PBEParameter { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'salt' => ['type' => ASN1::TYPE_OCTET_STRING], 'iterationCount' => ['type' => ASN1::TYPE_INTEGER] diff --git a/phpseclib/File/ASN1/Maps/PBES2params.php b/phpseclib/File/ASN1/Maps/PBES2params.php index 13befe91..5ab966d1 100644 --- a/phpseclib/File/ASN1/Maps/PBES2params.php +++ b/phpseclib/File/ASN1/Maps/PBES2params.php @@ -29,7 +29,7 @@ use phpseclib3\File\ASN1; abstract class PBES2params { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'keyDerivationFunc' => AlgorithmIdentifier::MAP, 'encryptionScheme' => AlgorithmIdentifier::MAP diff --git a/phpseclib/File/ASN1/Maps/PBKDF2params.php b/phpseclib/File/ASN1/Maps/PBKDF2params.php index b6fbbdd3..b5e1d220 100644 --- a/phpseclib/File/ASN1/Maps/PBKDF2params.php +++ b/phpseclib/File/ASN1/Maps/PBKDF2params.php @@ -29,14 +29,14 @@ use phpseclib3\File\ASN1; abstract class PBKDF2params { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ // technically, this is a CHOICE in RFC2898 but the other "choice" is, currently, more of a placeholder // in the RFC 'salt' => ['type' => ASN1::TYPE_OCTET_STRING], 'iterationCount' => ['type' => ASN1::TYPE_INTEGER], 'keyLength' => [ - 'type' => ASN1::TYPE_INTEGER, + 'type' => ASN1::TYPE_INTEGER, 'optional' => true ], 'prf' => AlgorithmIdentifier::MAP + ['optional' => true] diff --git a/phpseclib/File/ASN1/Maps/PBMAC1params.php b/phpseclib/File/ASN1/Maps/PBMAC1params.php index 2b259671..a4c7c38c 100644 --- a/phpseclib/File/ASN1/Maps/PBMAC1params.php +++ b/phpseclib/File/ASN1/Maps/PBMAC1params.php @@ -29,7 +29,7 @@ use phpseclib3\File\ASN1; abstract class PBMAC1params { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'keyDerivationFunc' => AlgorithmIdentifier::MAP, 'messageAuthScheme' => AlgorithmIdentifier::MAP diff --git a/phpseclib/File/ASN1/Maps/PKCS9String.php b/phpseclib/File/ASN1/Maps/PKCS9String.php index 95d68c4b..0700d23d 100644 --- a/phpseclib/File/ASN1/Maps/PKCS9String.php +++ b/phpseclib/File/ASN1/Maps/PKCS9String.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class PKCS9String { const MAP = [ - 'type' => ASN1::TYPE_CHOICE, + 'type' => ASN1::TYPE_CHOICE, 'children' => [ - 'ia5String' => ['type' => ASN1::TYPE_IA5_STRING], + 'ia5String' => ['type' => ASN1::TYPE_IA5_STRING], 'directoryString' => DirectoryString::MAP ] ]; diff --git a/phpseclib/File/ASN1/Maps/Pentanomial.php b/phpseclib/File/ASN1/Maps/Pentanomial.php index 1af566b8..f1c14be8 100644 --- a/phpseclib/File/ASN1/Maps/Pentanomial.php +++ b/phpseclib/File/ASN1/Maps/Pentanomial.php @@ -29,9 +29,9 @@ abstract class Pentanomial const MAP = [ 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'k1' => ['type' => ASN1::TYPE_INTEGER], // k1 > 0 - 'k2' => ['type' => ASN1::TYPE_INTEGER], // k2 > k1 - 'k3' => ['type' => ASN1::TYPE_INTEGER], // k3 > h2 + 'k1' => ['type' => ASN1::TYPE_INTEGER], // k1 > 0 + 'k2' => ['type' => ASN1::TYPE_INTEGER], // k2 > k1 + 'k3' => ['type' => ASN1::TYPE_INTEGER], // k3 > h2 ] ]; } diff --git a/phpseclib/File/ASN1/Maps/PersonalName.php b/phpseclib/File/ASN1/Maps/PersonalName.php index c9492c9e..167751cc 100644 --- a/phpseclib/File/ASN1/Maps/PersonalName.php +++ b/phpseclib/File/ASN1/Maps/PersonalName.php @@ -27,32 +27,32 @@ use phpseclib3\File\ASN1; abstract class PersonalName { const MAP = [ - 'type' => ASN1::TYPE_SET, + 'type' => ASN1::TYPE_SET, 'children' => [ - 'surname' => [ - 'type' => ASN1::TYPE_PRINTABLE_STRING, - 'constant' => 0, - 'optional' => true, - 'implicit' => true - ], - 'given-name' => [ - 'type' => ASN1::TYPE_PRINTABLE_STRING, - 'constant' => 1, - 'optional' => true, - 'implicit' => true - ], - 'initials' => [ - 'type' => ASN1::TYPE_PRINTABLE_STRING, - 'constant' => 2, - 'optional' => true, - 'implicit' => true - ], + 'surname' => [ + 'type' => ASN1::TYPE_PRINTABLE_STRING, + 'constant' => 0, + 'optional' => true, + 'implicit' => true + ], + 'given-name' => [ + 'type' => ASN1::TYPE_PRINTABLE_STRING, + 'constant' => 1, + 'optional' => true, + 'implicit' => true + ], + 'initials' => [ + 'type' => ASN1::TYPE_PRINTABLE_STRING, + 'constant' => 2, + 'optional' => true, + 'implicit' => true + ], 'generation-qualifier' => [ - 'type' => ASN1::TYPE_PRINTABLE_STRING, - 'constant' => 3, - 'optional' => true, - 'implicit' => true - ] + 'type' => ASN1::TYPE_PRINTABLE_STRING, + 'constant' => 3, + 'optional' => true, + 'implicit' => true + ] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/PolicyInformation.php b/phpseclib/File/ASN1/Maps/PolicyInformation.php index cfda3990..d2728e78 100644 --- a/phpseclib/File/ASN1/Maps/PolicyInformation.php +++ b/phpseclib/File/ASN1/Maps/PolicyInformation.php @@ -27,16 +27,16 @@ use phpseclib3\File\ASN1; abstract class PolicyInformation { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'policyIdentifier' => CertPolicyId::MAP, 'policyQualifiers' => [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 0, - 'max' => -1, - 'optional' => true, - 'children' => PolicyQualifierInfo::MAP - ] + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 0, + 'max' => -1, + 'optional' => true, + 'children' => PolicyQualifierInfo::MAP + ] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/PolicyMappings.php b/phpseclib/File/ASN1/Maps/PolicyMappings.php index c1086477..11fb8d64 100644 --- a/phpseclib/File/ASN1/Maps/PolicyMappings.php +++ b/phpseclib/File/ASN1/Maps/PolicyMappings.php @@ -27,15 +27,15 @@ use phpseclib3\File\ASN1; abstract class PolicyMappings { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => -1, + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => -1, 'children' => [ - 'type' => ASN1::TYPE_SEQUENCE, - 'children' => [ - 'issuerDomainPolicy' => CertPolicyId::MAP, - 'subjectDomainPolicy' => CertPolicyId::MAP - ] - ] + 'type' => ASN1::TYPE_SEQUENCE, + 'children' => [ + 'issuerDomainPolicy' => CertPolicyId::MAP, + 'subjectDomainPolicy' => CertPolicyId::MAP + ] + ] ]; } diff --git a/phpseclib/File/ASN1/Maps/PolicyQualifierInfo.php b/phpseclib/File/ASN1/Maps/PolicyQualifierInfo.php index a1d7e172..77e6f753 100644 --- a/phpseclib/File/ASN1/Maps/PolicyQualifierInfo.php +++ b/phpseclib/File/ASN1/Maps/PolicyQualifierInfo.php @@ -27,10 +27,10 @@ use phpseclib3\File\ASN1; abstract class PolicyQualifierInfo { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'policyQualifierId' => PolicyQualifierId::MAP, - 'qualifier' => ['type' => ASN1::TYPE_ANY] + 'qualifier' => ['type' => ASN1::TYPE_ANY] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/PostalAddress.php b/phpseclib/File/ASN1/Maps/PostalAddress.php index ec8354fa..15f615f9 100644 --- a/phpseclib/File/ASN1/Maps/PostalAddress.php +++ b/phpseclib/File/ASN1/Maps/PostalAddress.php @@ -27,10 +27,10 @@ use phpseclib3\File\ASN1; abstract class PostalAddress { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'optional' => true, - 'min' => 1, - 'max' => -1, + 'min' => 1, + 'max' => -1, 'children' => DirectoryString::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/PrivateDomainName.php b/phpseclib/File/ASN1/Maps/PrivateDomainName.php index b26c0cba..fd682f03 100644 --- a/phpseclib/File/ASN1/Maps/PrivateDomainName.php +++ b/phpseclib/File/ASN1/Maps/PrivateDomainName.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class PrivateDomainName { const MAP = [ - 'type' => ASN1::TYPE_CHOICE, + 'type' => ASN1::TYPE_CHOICE, 'children' => [ - 'numeric' => ['type' => ASN1::TYPE_NUMERIC_STRING], + 'numeric' => ['type' => ASN1::TYPE_NUMERIC_STRING], 'printable' => ['type' => ASN1::TYPE_PRINTABLE_STRING] ] ]; diff --git a/phpseclib/File/ASN1/Maps/PrivateKeyInfo.php b/phpseclib/File/ASN1/Maps/PrivateKeyInfo.php index 3b5c8c60..e836abfa 100644 --- a/phpseclib/File/ASN1/Maps/PrivateKeyInfo.php +++ b/phpseclib/File/ASN1/Maps/PrivateKeyInfo.php @@ -27,7 +27,7 @@ use phpseclib3\File\ASN1; abstract class PrivateKeyInfo { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'version' => [ 'type' => ASN1::TYPE_INTEGER, diff --git a/phpseclib/File/ASN1/Maps/PrivateKeyUsagePeriod.php b/phpseclib/File/ASN1/Maps/PrivateKeyUsagePeriod.php index 8c396a00..9878546c 100644 --- a/phpseclib/File/ASN1/Maps/PrivateKeyUsagePeriod.php +++ b/phpseclib/File/ASN1/Maps/PrivateKeyUsagePeriod.php @@ -27,18 +27,18 @@ use phpseclib3\File\ASN1; abstract class PrivateKeyUsagePeriod { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'notBefore' => [ - 'constant' => 0, - 'optional' => true, - 'implicit' => true, - 'type' => ASN1::TYPE_GENERALIZED_TIME], - 'notAfter' => [ - 'constant' => 1, - 'optional' => true, - 'implicit' => true, - 'type' => ASN1::TYPE_GENERALIZED_TIME] + 'constant' => 0, + 'optional' => true, + 'implicit' => true, + 'type' => ASN1::TYPE_GENERALIZED_TIME], + 'notAfter' => [ + 'constant' => 1, + 'optional' => true, + 'implicit' => true, + 'type' => ASN1::TYPE_GENERALIZED_TIME] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/PublicKeyAndChallenge.php b/phpseclib/File/ASN1/Maps/PublicKeyAndChallenge.php index ef212812..83fd386e 100644 --- a/phpseclib/File/ASN1/Maps/PublicKeyAndChallenge.php +++ b/phpseclib/File/ASN1/Maps/PublicKeyAndChallenge.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class PublicKeyAndChallenge { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'spki' => SubjectPublicKeyInfo::MAP, + 'spki' => SubjectPublicKeyInfo::MAP, 'challenge' => ['type' => ASN1::TYPE_IA5_STRING] ] ]; diff --git a/phpseclib/File/ASN1/Maps/PublicKeyInfo.php b/phpseclib/File/ASN1/Maps/PublicKeyInfo.php index 81aea29e..bfa9c2e4 100644 --- a/phpseclib/File/ASN1/Maps/PublicKeyInfo.php +++ b/phpseclib/File/ASN1/Maps/PublicKeyInfo.php @@ -30,7 +30,7 @@ use phpseclib3\File\ASN1; abstract class PublicKeyInfo { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'publicKeyAlgorithm' => AlgorithmIdentifier::MAP, 'publicKey' => ['type' => ASN1::TYPE_BIT_STRING] diff --git a/phpseclib/File/ASN1/Maps/RC2CBCParameter.php b/phpseclib/File/ASN1/Maps/RC2CBCParameter.php index 597f02df..f32ea970 100644 --- a/phpseclib/File/ASN1/Maps/RC2CBCParameter.php +++ b/phpseclib/File/ASN1/Maps/RC2CBCParameter.php @@ -29,10 +29,10 @@ use phpseclib3\File\ASN1; abstract class RC2CBCParameter { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'rc2ParametersVersion' => [ - 'type' => ASN1::TYPE_INTEGER, + 'type' => ASN1::TYPE_INTEGER, 'optional' => true ], 'iv' => ['type' => ASN1::TYPE_OCTET_STRING] diff --git a/phpseclib/File/ASN1/Maps/RDNSequence.php b/phpseclib/File/ASN1/Maps/RDNSequence.php index 848e2c93..f2f1dcf0 100644 --- a/phpseclib/File/ASN1/Maps/RDNSequence.php +++ b/phpseclib/File/ASN1/Maps/RDNSequence.php @@ -33,10 +33,10 @@ use phpseclib3\File\ASN1; abstract class RDNSequence { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, // RDNSequence does not define a min or a max, which means it doesn't have one - 'min' => 0, - 'max' => -1, + 'min' => 0, + 'max' => -1, 'children' => RelativeDistinguishedName::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/RSAPrivateKey.php b/phpseclib/File/ASN1/Maps/RSAPrivateKey.php index fbbb0f7c..1fdd231b 100644 --- a/phpseclib/File/ASN1/Maps/RSAPrivateKey.php +++ b/phpseclib/File/ASN1/Maps/RSAPrivateKey.php @@ -34,14 +34,14 @@ abstract class RSAPrivateKey 'type' => ASN1::TYPE_INTEGER, 'mapping' => ['two-prime', 'multi'] ], - 'modulus' => ['type' => ASN1::TYPE_INTEGER], // n - 'publicExponent' => ['type' => ASN1::TYPE_INTEGER], // e + 'modulus' => ['type' => ASN1::TYPE_INTEGER], // n + 'publicExponent' => ['type' => ASN1::TYPE_INTEGER], // e 'privateExponent' => ['type' => ASN1::TYPE_INTEGER], // d - 'prime1' => ['type' => ASN1::TYPE_INTEGER], // p - 'prime2' => ['type' => ASN1::TYPE_INTEGER], // q - 'exponent1' => ['type' => ASN1::TYPE_INTEGER], // d mod (p-1) - 'exponent2' => ['type' => ASN1::TYPE_INTEGER], // d mod (q-1) - 'coefficient' => ['type' => ASN1::TYPE_INTEGER], // (inverse of q) mod p + 'prime1' => ['type' => ASN1::TYPE_INTEGER], // p + 'prime2' => ['type' => ASN1::TYPE_INTEGER], // q + 'exponent1' => ['type' => ASN1::TYPE_INTEGER], // d mod (p-1) + 'exponent2' => ['type' => ASN1::TYPE_INTEGER], // d mod (q-1) + 'coefficient' => ['type' => ASN1::TYPE_INTEGER], // (inverse of q) mod p 'otherPrimeInfos' => OtherPrimeInfos::MAP + ['optional' => true] ] ]; diff --git a/phpseclib/File/ASN1/Maps/RSAPublicKey.php b/phpseclib/File/ASN1/Maps/RSAPublicKey.php index 1ea441d0..14cd8687 100644 --- a/phpseclib/File/ASN1/Maps/RSAPublicKey.php +++ b/phpseclib/File/ASN1/Maps/RSAPublicKey.php @@ -29,8 +29,8 @@ abstract class RSAPublicKey const MAP = [ 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'modulus' => ['type' => ASN1::TYPE_INTEGER], - 'publicExponent' => ['type' => ASN1::TYPE_INTEGER] + 'modulus' => ['type' => ASN1::TYPE_INTEGER], + 'publicExponent' => ['type' => ASN1::TYPE_INTEGER] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/RSASSA_PSS_params.php b/phpseclib/File/ASN1/Maps/RSASSA_PSS_params.php index b9ad46b0..1a4b3809 100644 --- a/phpseclib/File/ASN1/Maps/RSASSA_PSS_params.php +++ b/phpseclib/File/ASN1/Maps/RSASSA_PSS_params.php @@ -29,9 +29,9 @@ use phpseclib3\File\ASN1; abstract class RSASSA_PSS_params { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'hashAlgorithm' => [ + 'hashAlgorithm' => [ 'constant' => 0, 'optional' => true, 'explicit' => true, @@ -43,19 +43,19 @@ abstract class RSASSA_PSS_params 'explicit' => true, //'default' => 'mgf1SHA1Identifier' ] + MaskGenAlgorithm::MAP, - 'saltLength' => [ - 'type' => ASN1::TYPE_INTEGER, + 'saltLength' => [ + 'type' => ASN1::TYPE_INTEGER, 'constant' => 2, 'optional' => true, 'explicit' => true, - 'default' => 20 + 'default' => 20 ], - 'trailerField' => [ - 'type' => ASN1::TYPE_INTEGER, + 'trailerField' => [ + 'type' => ASN1::TYPE_INTEGER, 'constant' => 3, 'optional' => true, 'explicit' => true, - 'default' => 1 + 'default' => 1 ] ] ]; diff --git a/phpseclib/File/ASN1/Maps/ReasonFlags.php b/phpseclib/File/ASN1/Maps/ReasonFlags.php index 3cb32c48..a834156d 100644 --- a/phpseclib/File/ASN1/Maps/ReasonFlags.php +++ b/phpseclib/File/ASN1/Maps/ReasonFlags.php @@ -27,7 +27,7 @@ use phpseclib3\File\ASN1; abstract class ReasonFlags { const MAP = [ - 'type' => ASN1::TYPE_BIT_STRING, + 'type' => ASN1::TYPE_BIT_STRING, 'mapping' => [ 'unused', 'keyCompromise', diff --git a/phpseclib/File/ASN1/Maps/RelativeDistinguishedName.php b/phpseclib/File/ASN1/Maps/RelativeDistinguishedName.php index de9dfaf6..9a9af402 100644 --- a/phpseclib/File/ASN1/Maps/RelativeDistinguishedName.php +++ b/phpseclib/File/ASN1/Maps/RelativeDistinguishedName.php @@ -33,9 +33,9 @@ use phpseclib3\File\ASN1; abstract class RelativeDistinguishedName { const MAP = [ - 'type' => ASN1::TYPE_SET, - 'min' => 1, - 'max' => -1, + 'type' => ASN1::TYPE_SET, + 'min' => 1, + 'max' => -1, 'children' => AttributeTypeAndValue::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/RevokedCertificate.php b/phpseclib/File/ASN1/Maps/RevokedCertificate.php index b012d9df..21da71eb 100644 --- a/phpseclib/File/ASN1/Maps/RevokedCertificate.php +++ b/phpseclib/File/ASN1/Maps/RevokedCertificate.php @@ -27,13 +27,13 @@ use phpseclib3\File\ASN1; abstract class RevokedCertificate { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'userCertificate' => CertificateSerialNumber::MAP, - 'revocationDate' => Time::MAP, - 'crlEntryExtensions' => [ - 'optional' => true - ] + Extensions::MAP - ] + 'userCertificate' => CertificateSerialNumber::MAP, + 'revocationDate' => Time::MAP, + 'crlEntryExtensions' => [ + 'optional' => true + ] + Extensions::MAP + ] ]; } diff --git a/phpseclib/File/ASN1/Maps/SignedPublicKeyAndChallenge.php b/phpseclib/File/ASN1/Maps/SignedPublicKeyAndChallenge.php index c3591e2f..d723d572 100644 --- a/phpseclib/File/ASN1/Maps/SignedPublicKeyAndChallenge.php +++ b/phpseclib/File/ASN1/Maps/SignedPublicKeyAndChallenge.php @@ -27,11 +27,11 @@ use phpseclib3\File\ASN1; abstract class SignedPublicKeyAndChallenge { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'publicKeyAndChallenge' => PublicKeyAndChallenge::MAP, - 'signatureAlgorithm' => AlgorithmIdentifier::MAP, - 'signature' => ['type' => ASN1::TYPE_BIT_STRING] + 'signatureAlgorithm' => AlgorithmIdentifier::MAP, + 'signature' => ['type' => ASN1::TYPE_BIT_STRING] ] ]; } diff --git a/phpseclib/File/ASN1/Maps/SpecifiedECDomain.php b/phpseclib/File/ASN1/Maps/SpecifiedECDomain.php index fb437eab..28bfed54 100644 --- a/phpseclib/File/ASN1/Maps/SpecifiedECDomain.php +++ b/phpseclib/File/ASN1/Maps/SpecifiedECDomain.php @@ -29,7 +29,7 @@ use phpseclib3\File\ASN1; abstract class SpecifiedECDomain { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'version' => [ 'type' => ASN1::TYPE_INTEGER, diff --git a/phpseclib/File/ASN1/Maps/SubjectDirectoryAttributes.php b/phpseclib/File/ASN1/Maps/SubjectDirectoryAttributes.php index 1eff925a..8e850267 100644 --- a/phpseclib/File/ASN1/Maps/SubjectDirectoryAttributes.php +++ b/phpseclib/File/ASN1/Maps/SubjectDirectoryAttributes.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class SubjectDirectoryAttributes { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => -1, + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => -1, 'children' => Attribute::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/SubjectInfoAccessSyntax.php b/phpseclib/File/ASN1/Maps/SubjectInfoAccessSyntax.php index 98ab3ddd..910f8215 100644 --- a/phpseclib/File/ASN1/Maps/SubjectInfoAccessSyntax.php +++ b/phpseclib/File/ASN1/Maps/SubjectInfoAccessSyntax.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class SubjectInfoAccessSyntax { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, - 'min' => 1, - 'max' => -1, + 'type' => ASN1::TYPE_SEQUENCE, + 'min' => 1, + 'max' => -1, 'children' => AccessDescription::MAP ]; } diff --git a/phpseclib/File/ASN1/Maps/SubjectPublicKeyInfo.php b/phpseclib/File/ASN1/Maps/SubjectPublicKeyInfo.php index c367608c..1b366320 100644 --- a/phpseclib/File/ASN1/Maps/SubjectPublicKeyInfo.php +++ b/phpseclib/File/ASN1/Maps/SubjectPublicKeyInfo.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class SubjectPublicKeyInfo { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'algorithm' => AlgorithmIdentifier::MAP, + 'algorithm' => AlgorithmIdentifier::MAP, 'subjectPublicKey' => ['type' => ASN1::TYPE_BIT_STRING] ] ]; diff --git a/phpseclib/File/ASN1/Maps/TBSCertList.php b/phpseclib/File/ASN1/Maps/TBSCertList.php index 49be58eb..93d81484 100644 --- a/phpseclib/File/ASN1/Maps/TBSCertList.php +++ b/phpseclib/File/ASN1/Maps/TBSCertList.php @@ -27,32 +27,32 @@ use phpseclib3\File\ASN1; abstract class TBSCertList { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ - 'version' => [ - 'type' => ASN1::TYPE_INTEGER, - 'mapping' => ['v1', 'v2', 'v3'], - 'optional' => true, - 'default' => 'v2' - ], - 'signature' => AlgorithmIdentifier::MAP, - 'issuer' => Name::MAP, - 'thisUpdate' => Time::MAP, - 'nextUpdate' => [ - 'optional' => true - ] + Time::MAP, + 'version' => [ + 'type' => ASN1::TYPE_INTEGER, + 'mapping' => ['v1', 'v2', 'v3'], + 'optional' => true, + 'default' => 'v2' + ], + 'signature' => AlgorithmIdentifier::MAP, + 'issuer' => Name::MAP, + 'thisUpdate' => Time::MAP, + 'nextUpdate' => [ + 'optional' => true + ] + Time::MAP, 'revokedCertificates' => [ - 'type' => ASN1::TYPE_SEQUENCE, - 'optional' => true, - 'min' => 0, - 'max' => -1, - 'children' => RevokedCertificate::MAP - ], - 'crlExtensions' => [ - 'constant' => 0, - 'optional' => true, - 'explicit' => true - ] + Extensions::MAP + 'type' => ASN1::TYPE_SEQUENCE, + 'optional' => true, + 'min' => 0, + 'max' => -1, + 'children' => RevokedCertificate::MAP + ], + 'crlExtensions' => [ + 'constant' => 0, + 'optional' => true, + 'explicit' => true + ] + Extensions::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/TBSCertificate.php b/phpseclib/File/ASN1/Maps/TBSCertificate.php index dc5fe2aa..b3ca20bf 100644 --- a/phpseclib/File/ASN1/Maps/TBSCertificate.php +++ b/phpseclib/File/ASN1/Maps/TBSCertificate.php @@ -28,42 +28,42 @@ abstract class TBSCertificate { // assert($TBSCertificate['children']['signature'] == $Certificate['children']['signatureAlgorithm']) const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ // technically, default implies optional, but we'll define it as being optional, none-the-less, just to // reenforce that fact - 'version' => [ - 'type' => ASN1::TYPE_INTEGER, - 'constant' => 0, - 'optional' => true, - 'explicit' => true, - 'mapping' => ['v1', 'v2', 'v3'], - 'default' => 'v1' - ], - 'serialNumber' => CertificateSerialNumber::MAP, - 'signature' => AlgorithmIdentifier::MAP, - 'issuer' => Name::MAP, - 'validity' => Validity::MAP, - 'subject' => Name::MAP, + 'version' => [ + 'type' => ASN1::TYPE_INTEGER, + 'constant' => 0, + 'optional' => true, + 'explicit' => true, + 'mapping' => ['v1', 'v2', 'v3'], + 'default' => 'v1' + ], + 'serialNumber' => CertificateSerialNumber::MAP, + 'signature' => AlgorithmIdentifier::MAP, + 'issuer' => Name::MAP, + 'validity' => Validity::MAP, + 'subject' => Name::MAP, 'subjectPublicKeyInfo' => SubjectPublicKeyInfo::MAP, // implicit means that the T in the TLV structure is to be rewritten, regardless of the type - 'issuerUniqueID' => [ - 'constant' => 1, - 'optional' => true, - 'implicit' => true - ] + UniqueIdentifier::MAP, - 'subjectUniqueID' => [ - 'constant' => 2, - 'optional' => true, - 'implicit' => true - ] + UniqueIdentifier::MAP, + 'issuerUniqueID' => [ + 'constant' => 1, + 'optional' => true, + 'implicit' => true + ] + UniqueIdentifier::MAP, + 'subjectUniqueID' => [ + 'constant' => 2, + 'optional' => true, + 'implicit' => true + ] + UniqueIdentifier::MAP, // doesn't use the EXPLICIT keyword but if // it's not IMPLICIT, it's EXPLICIT - 'extensions' => [ - 'constant' => 3, - 'optional' => true, - 'explicit' => true - ] + Extensions::MAP + 'extensions' => [ + 'constant' => 3, + 'optional' => true, + 'explicit' => true + ] + Extensions::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/Time.php b/phpseclib/File/ASN1/Maps/Time.php index a673c3af..3bc309f5 100644 --- a/phpseclib/File/ASN1/Maps/Time.php +++ b/phpseclib/File/ASN1/Maps/Time.php @@ -27,9 +27,9 @@ use phpseclib3\File\ASN1; abstract class Time { const MAP = [ - 'type' => ASN1::TYPE_CHOICE, + 'type' => ASN1::TYPE_CHOICE, 'children' => [ - 'utcTime' => ['type' => ASN1::TYPE_UTC_TIME], + 'utcTime' => ['type' => ASN1::TYPE_UTC_TIME], 'generalTime' => ['type' => ASN1::TYPE_GENERALIZED_TIME] ] ]; diff --git a/phpseclib/File/ASN1/Maps/UserNotice.php b/phpseclib/File/ASN1/Maps/UserNotice.php index 2a0c8654..9addbce2 100644 --- a/phpseclib/File/ASN1/Maps/UserNotice.php +++ b/phpseclib/File/ASN1/Maps/UserNotice.php @@ -27,16 +27,16 @@ use phpseclib3\File\ASN1; abstract class UserNotice { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'noticeRef' => [ - 'optional' => true, - 'implicit' => true - ] + NoticeReference::MAP, - 'explicitText' => [ - 'optional' => true, - 'implicit' => true - ] + DisplayText::MAP + 'optional' => true, + 'implicit' => true + ] + NoticeReference::MAP, + 'explicitText' => [ + 'optional' => true, + 'implicit' => true + ] + DisplayText::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/Validity.php b/phpseclib/File/ASN1/Maps/Validity.php index 040aa7f5..aa609e25 100644 --- a/phpseclib/File/ASN1/Maps/Validity.php +++ b/phpseclib/File/ASN1/Maps/Validity.php @@ -27,10 +27,10 @@ use phpseclib3\File\ASN1; abstract class Validity { const MAP = [ - 'type' => ASN1::TYPE_SEQUENCE, + 'type' => ASN1::TYPE_SEQUENCE, 'children' => [ 'notBefore' => Time::MAP, - 'notAfter' => Time::MAP + 'notAfter' => Time::MAP ] ]; } diff --git a/phpseclib/File/ASN1/Maps/netscape_cert_type.php b/phpseclib/File/ASN1/Maps/netscape_cert_type.php index c5845b59..1fd490b1 100644 --- a/phpseclib/File/ASN1/Maps/netscape_cert_type.php +++ b/phpseclib/File/ASN1/Maps/netscape_cert_type.php @@ -29,7 +29,7 @@ use phpseclib3\File\ASN1; abstract class netscape_cert_type { const MAP = [ - 'type' => ASN1::TYPE_BIT_STRING, + 'type' => ASN1::TYPE_BIT_STRING, 'mapping' => [ 'SSLClient', 'SSLServer',