mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-03 18:18:05 +01:00
File/ASN1/Maps: CS adjustments
these are mostly backported from PR#1754. the only modified files from that PR are: - RSAPrivateKey - OtherPrimeInfo
This commit is contained in:
parent
f2e9dd993d
commit
5f60f96487
@ -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
|
||||
]
|
||||
];
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
|
@ -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
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
]
|
||||
];
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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,
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
|
@ -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],
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
|
@ -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
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
|
@ -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
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
]
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
|
@ -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,
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
]
|
||||
];
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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,
|
||||
// <http://tools.ietf.org/html/rfc2459#page-74> 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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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]
|
||||
]
|
||||
];
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user