[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ -> Extension.php (source)

   1  <?php
   2  
   3  /**
   4   * Extension
   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  
  14  namespace phpseclib3\File\ASN1\Maps;
  15  
  16  use phpseclib3\File\ASN1;
  17  
  18  /**
  19   * Extension
  20   *
  21   * A certificate using system MUST reject the certificate if it encounters
  22   * a critical extension it does not recognize; however, a non-critical
  23   * extension may be ignored if it is not recognized.
  24   *
  25   * http://tools.ietf.org/html/rfc5280#section-4.2
  26   *
  27   * @author  Jim Wigginton <terrafrost@php.net>
  28   */
  29  abstract class Extension
  30  {
  31      const MAP = [
  32          'type' => ASN1::TYPE_SEQUENCE,
  33          'children' => [
  34              'extnId' => ['type' => ASN1::TYPE_OBJECT_IDENTIFIER],
  35              'critical' => [
  36                  'type' => ASN1::TYPE_BOOLEAN,
  37                  'optional' => true,
  38                  'default' => false
  39              ],
  40              'extnValue' => ['type' => ASN1::TYPE_OCTET_STRING]
  41          ]
  42      ];
  43  }