Subversion Repositories oidplus

Rev

Rev 846 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
827 daniel-mar 1
<?php
2
 
3
/**
4
 * Extension
5
 *
6
 * PHP version 5
7
 *
874 daniel-mar 8
 * @category  File
9
 * @package   ASN1
827 daniel-mar 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
 
16
namespace phpseclib3\File\ASN1\Maps;
17
 
18
use 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
 *
874 daniel-mar 29
 * @package ASN1
827 daniel-mar 30
 * @author  Jim Wigginton <terrafrost@php.net>
874 daniel-mar 31
 * @access  public
827 daniel-mar 32
 */
33
abstract 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
}