コード例 #1
0
 /**
  * Constructor
  *
  * @param bool $critical Conforming CA's must mark as non-critical (false)
  * @param string|null $keyIdentifier
  * @param GeneralNames|null $issuer
  * @param int|string|null $serial
  */
 public function __construct($critical, $keyIdentifier, GeneralNames $issuer = null, $serial = null)
 {
     parent::__construct(self::OID_AUTHORITY_KEY_IDENTIFIER, $critical);
     $this->_keyIdentifier = $keyIdentifier;
     $this->_authorityCertIssuer = $issuer;
     $this->_authorityCertSerialNumber = $serial;
 }
コード例 #2
0
ファイル: Extensions.php プロジェクト: sop/x509
 /**
  * Initialize from ASN.1.
  *
  * @param Sequence $seq
  * @return self
  */
 public static function fromASN1(Sequence $seq)
 {
     $extensions = array_map(function (UnspecifiedType $el) {
         return Extension::fromASN1($el->asSequence());
     }, $seq->elements());
     return new self(...$extensions);
 }
コード例 #3
0
 /**
  * Constructor
  *
  * @param bool $critical
  * @param PolicyInformation ...$policies
  */
 public function __construct($critical, PolicyInformation ...$policies)
 {
     parent::__construct(Extension::OID_CERTIFICATE_POLICIES, $critical);
     $this->_policies = array();
     foreach ($policies as $policy) {
         $this->_policies[$policy->oid()] = $policy;
     }
 }
コード例 #4
0
ファイル: AAControlsExtension.php プロジェクト: sop/x509
 /**
  * Constructor
  *
  * @param bool $critical
  * @param int|null $path_len
  * @param string[]|null $permitted
  * @param string[]|null $excluded
  * @param bool $permit_unspecified
  */
 public function __construct($critical, $path_len = null, array $permitted = null, array $excluded = null, $permit_unspecified = true)
 {
     parent::__construct(self::OID_AA_CONTROLS, $critical);
     $this->_pathLenConstraint = $path_len;
     $this->_permittedAttrs = $permitted;
     $this->_excludedAttrs = $excluded;
     $this->_permitUnSpecified = $permit_unspecified;
 }
コード例 #5
0
 /**
  * Constructor
  *
  * @param bool $critical
  * @param int|null $require_explicit_policy
  * @param int|null $inhibit_policy_mapping
  */
 public function __construct($critical, $require_explicit_policy = null, $inhibit_policy_mapping = null)
 {
     parent::__construct(self::OID_POLICY_CONSTRAINTS, $critical);
     $this->_requireExplicitPolicy = $require_explicit_policy;
     $this->_inhibitPolicyMapping = $inhibit_policy_mapping;
 }
コード例 #6
0
 /**
  * Constructor
  *
  * @param bool $critical
  * @param GeneralNames $names
  */
 public function __construct($critical, GeneralNames $names)
 {
     parent::__construct(self::OID_SUBJECT_ALT_NAME, $critical);
     $this->_names = $names;
 }
コード例 #7
0
 /**
  * Constructor
  *
  * @param bool $critical
  * @param bool $ca
  * @param int|null $path_len
  */
 public function __construct($critical, $ca, $path_len = null)
 {
     parent::__construct(self::OID_BASIC_CONSTRAINTS, $critical);
     $this->_ca = (bool) $ca;
     $this->_pathLen = $path_len;
 }
コード例 #8
0
 /**
  * Constructor
  *
  * @param bool $critical
  * @param Attribute ...$attribs One or more Attribute objects
  */
 public function __construct($critical, Attribute ...$attribs)
 {
     parent::__construct(self::OID_SUBJECT_DIRECTORY_ATTRIBUTES, $critical);
     $this->_attributes = $attribs;
 }
コード例 #9
0
ファイル: FreshestCRLExtension.php プロジェクト: sop/x509
 /**
  * Constructor
  *
  * @param bool $critical
  * @param DistributionPoint ...$distribution_points
  */
 public function __construct($critical, DistributionPoint ...$distribution_points)
 {
     Extension::__construct(self::OID_FRESHEST_CRL, $critical);
     $this->_distributionPoints = $distribution_points;
 }
コード例 #10
0
 /**
  * Constructor
  *
  * @param bool $critical
  * @param DistributionPoint ...$distribution_points
  */
 public function __construct($critical, DistributionPoint ...$distribution_points)
 {
     parent::__construct(self::OID_CRL_DISTRIBUTION_POINTS, $critical);
     $this->_distributionPoints = $distribution_points;
 }
コード例 #11
0
ファイル: KeyUsageExtension.php プロジェクト: sop/x509
 /**
  * Constructor
  *
  * @param bool $critical
  * @param int $keyUsage
  */
 public function __construct($critical, $keyUsage)
 {
     parent::__construct(self::OID_KEY_USAGE, $critical);
     $this->_keyUsage = (int) $keyUsage;
 }
コード例 #12
0
 /**
  * Constructor
  *
  * @param bool $critical
  */
 public function __construct($critical)
 {
     parent::__construct(self::OID_NO_REV_AVAIL, $critical);
 }
コード例 #13
0
 /**
  * Constructor
  *
  * @param bool $critical
  * @param string ...$purposes
  */
 public function __construct($critical, ...$purposes)
 {
     parent::__construct(self::OID_EXT_KEY_USAGE, $critical);
     $this->_purposes = $purposes;
 }
コード例 #14
0
 /**
  * Constructor
  *
  * @param bool $critical
  * @param int $skip_certs
  */
 public function __construct($critical, $skip_certs)
 {
     parent::__construct(self::OID_INHIBIT_ANY_POLICY, $critical);
     $this->_skipCerts = $skip_certs;
 }
コード例 #15
0
ファイル: UnknownExtension.php プロジェクト: sop/x509
 /**
  * Constructor
  *
  * @param string $oid
  * @param bool $critical
  * @param Element $data
  */
 public function __construct($oid, $critical, Element $data)
 {
     parent::__construct($oid, $critical);
     $this->_element = $data;
 }
コード例 #16
0
 /**
  * Constructor
  *
  * @param bool $critical
  * @param Targets ...$targets
  */
 public function __construct($critical, Targets ...$targets)
 {
     parent::__construct(self::OID_TARGET_INFORMATION, $critical);
     $this->_targets = $targets;
 }
コード例 #17
0
ファイル: PolicyMappingsExtension.php プロジェクト: sop/x509
 /**
  * Constructor
  *
  * @param bool $critical
  * @param PolicyMapping ...$mappings One or more PolicyMapping objects
  */
 public function __construct($critical, PolicyMapping ...$mappings)
 {
     parent::__construct(self::OID_POLICY_MAPPINGS, $critical);
     $this->_mappings = $mappings;
 }
コード例 #18
0
ファイル: NameConstraintsExtension.php プロジェクト: sop/x509
 /**
  * Constructor
  *
  * @param bool $critical
  * @param GeneralSubtrees $permitted
  * @param GeneralSubtrees $excluded
  */
 public function __construct($critical, GeneralSubtrees $permitted = null, GeneralSubtrees $excluded = null)
 {
     parent::__construct(self::OID_NAME_CONSTRAINTS, $critical);
     $this->_permitted = $permitted;
     $this->_excluded = $excluded;
 }
コード例 #19
0
 /**
  * Constructor
  *
  * @param bool $critical
  * @param string $keyIdentifier
  */
 public function __construct($critical, $keyIdentifier)
 {
     parent::__construct(self::OID_SUBJECT_KEY_IDENTIFIER, $critical);
     $this->_keyIdentifier = $keyIdentifier;
 }