BuiltInStandardAttributes.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * BuiltInStandardAttributes
  4. *
  5. * PHP version 5
  6. *
  7. * @category File
  8. * @package ASN1
  9. * @author Jim Wigginton <terrafrost@php.net>
  10. * @copyright 2016 Jim Wigginton
  11. * @license http://www.opensource.org/licenses/mit-license.html MIT License
  12. * @link http://phpseclib.sourceforge.net
  13. */
  14. namespace phpseclib\File\ASN1\Maps;
  15. use phpseclib\File\ASN1;
  16. /**
  17. * BuiltInStandardAttributes
  18. *
  19. * @package ASN1
  20. * @author Jim Wigginton <terrafrost@php.net>
  21. * @access public
  22. */
  23. abstract class BuiltInStandardAttributes
  24. {
  25. const MAP = [
  26. 'type' => ASN1::TYPE_SEQUENCE,
  27. 'children' => [
  28. 'country-name' => ['optional' => true] + CountryName::MAP,
  29. 'administration-domain-name' => ['optional' => true] + AdministrationDomainName::MAP,
  30. 'network-address' => [
  31. 'constant' => 0,
  32. 'optional' => true,
  33. 'implicit' => true
  34. ] + NetworkAddress::MAP,
  35. 'terminal-identifier' => [
  36. 'constant' => 1,
  37. 'optional' => true,
  38. 'implicit' => true
  39. ] + TerminalIdentifier::MAP,
  40. 'private-domain-name' => [
  41. 'constant' => 2,
  42. 'optional' => true,
  43. 'explicit' => true
  44. ] + PrivateDomainName::MAP,
  45. 'organization-name' => [
  46. 'constant' => 3,
  47. 'optional' => true,
  48. 'implicit' => true
  49. ] + OrganizationName::MAP,
  50. 'numeric-user-identifier' => [
  51. 'constant' => 4,
  52. 'optional' => true,
  53. 'implicit' => true
  54. ] + NumericUserIdentifier::MAP,
  55. 'personal-name' => [
  56. 'constant' => 5,
  57. 'optional' => true,
  58. 'implicit' => true
  59. ] + PersonalName::MAP,
  60. 'organizational-unit-names' => [
  61. 'constant' => 6,
  62. 'optional' => true,
  63. 'implicit' => true
  64. ] + OrganizationalUnitNames::MAP
  65. ]
  66. ];
  67. }