1<?php
2
3/**
4 * GeneralName
5 *
6 * PHP version 5
7 *
8 * @author    Jim Wigginton <terrafrost@php.net>
9 * @copyright 2016 Jim Wigginton
10 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
11 * @link      http://phpseclib.sourceforge.net
12 */
13
14namespace phpseclib3\File\ASN1\Maps;
15
16use phpseclib3\File\ASN1;
17
18/**
19 * GeneralName
20 *
21 * @author  Jim Wigginton <terrafrost@php.net>
22 */
23abstract 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}
81