1<?php
2
3/**
4 * Extension
5 *
6 * PHP version 5
7 *
8 * @category  File
9 * @package   ASN1
10 * @author    Jim Wigginton <terrafrost@php.net>
11 * @copyright 2016 Jim Wigginton
12 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
13 * @link      http://phpseclib.sourceforge.net
14 */
15
16namespace phpseclib3\File\ASN1\Maps;
17
18use phpseclib3\File\ASN1;
19
20/**
21 * Extension
22 *
23 * A certificate using system MUST reject the certificate if it encounters
24 * a critical extension it does not recognize; however, a non-critical
25 * extension may be ignored if it is not recognized.
26 *
27 * http://tools.ietf.org/html/rfc5280#section-4.2
28 *
29 * @package ASN1
30 * @author  Jim Wigginton <terrafrost@php.net>
31 * @access  public
32 */
33abstract class Extension
34{
35    const MAP = [
36        'type' => ASN1::TYPE_SEQUENCE,
37        'children' => [
38            'extnId' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER],
39            'critical' => [
40                'type' => ASN1::TYPE_BOOLEAN,
41                'optional' => true,
42                'default' => false
43            ],
44            'extnValue' => ['type' => ASN1::TYPE_OCTET_STRING]
45        ]
46    ];
47}
48