GeneralName.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /**
  3. * GeneralName
  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. * GeneralName
  18. *
  19. * @package ASN1
  20. * @author Jim Wigginton <terrafrost@php.net>
  21. * @access public
  22. */
  23. abstract class GeneralName
  24. {
  25. const MAP = [
  26. 'type' => ASN1::TYPE_CHOICE,
  27. 'children' => [
  28. 'otherName' => [
  29. 'constant' => 0,
  30. 'optional' => true,
  31. 'implicit' => true
  32. ] + AnotherName::MAP,
  33. 'rfc822Name' => [
  34. 'type' => ASN1::TYPE_IA5_STRING,
  35. 'constant' => 1,
  36. 'optional' => true,
  37. 'implicit' => true
  38. ],
  39. 'dNSName' => [
  40. 'type' => ASN1::TYPE_IA5_STRING,
  41. 'constant' => 2,
  42. 'optional' => true,
  43. 'implicit' => true
  44. ],
  45. 'x400Address' => [
  46. 'constant' => 3,
  47. 'optional' => true,
  48. 'implicit' => true
  49. ] + ORAddress::MAP,
  50. 'directoryName' => [
  51. 'constant' => 4,
  52. 'optional' => true,
  53. 'explicit' => true
  54. ] + Name::MAP,
  55. 'ediPartyName' => [
  56. 'constant' => 5,
  57. 'optional' => true,
  58. 'implicit' => true
  59. ] + EDIPartyName::MAP,
  60. 'uniformResourceIdentifier' => [
  61. 'type' => ASN1::TYPE_IA5_STRING,
  62. 'constant' => 6,
  63. 'optional' => true,
  64. 'implicit' => true
  65. ],
  66. 'iPAddress' => [
  67. 'type' => ASN1::TYPE_OCTET_STRING,
  68. 'constant' => 7,
  69. 'optional' => true,
  70. 'implicit' => true
  71. ],
  72. 'registeredID' => [
  73. 'type' => ASN1::TYPE_OBJECT_IDENTIFIER,
  74. 'constant' => 8,
  75. 'optional' => true,
  76. 'implicit' => true
  77. ]
  78. ]
  79. ];
  80. }