/** * 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; }
/** * 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); }
/** * 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; } }
/** * 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; }
/** * 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; }
/** * Constructor * * @param bool $critical * @param GeneralNames $names */ public function __construct($critical, GeneralNames $names) { parent::__construct(self::OID_SUBJECT_ALT_NAME, $critical); $this->_names = $names; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * Constructor * * @param bool $critical * @param int $keyUsage */ public function __construct($critical, $keyUsage) { parent::__construct(self::OID_KEY_USAGE, $critical); $this->_keyUsage = (int) $keyUsage; }
/** * Constructor * * @param bool $critical */ public function __construct($critical) { parent::__construct(self::OID_NO_REV_AVAIL, $critical); }
/** * Constructor * * @param bool $critical * @param string ...$purposes */ public function __construct($critical, ...$purposes) { parent::__construct(self::OID_EXT_KEY_USAGE, $critical); $this->_purposes = $purposes; }
/** * 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; }
/** * Constructor * * @param string $oid * @param bool $critical * @param Element $data */ public function __construct($oid, $critical, Element $data) { parent::__construct($oid, $critical); $this->_element = $data; }
/** * Constructor * * @param bool $critical * @param Targets ...$targets */ public function __construct($critical, Targets ...$targets) { parent::__construct(self::OID_TARGET_INFORMATION, $critical); $this->_targets = $targets; }
/** * 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; }
/** * 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; }
/** * Constructor * * @param bool $critical * @param string $keyIdentifier */ public function __construct($critical, $keyIdentifier) { parent::__construct(self::OID_SUBJECT_KEY_IDENTIFIER, $critical); $this->_keyIdentifier = $keyIdentifier; }