Lines Matching refs:dn

146     private $dn;
437 $this->dn = $cert['tbsCertificate']['subject'];
438 if (!isset($this->dn)) {
490 $this->dn = $x509['tbsCertificate']['subject'];
967 $olddn = $this->dn;
974 $this->dn = $olddn;
1008 $this->dn = $olddn;
1652 if (empty($this->dn)) {
1653 $this->dn = ['rdnSequence' => []];
1664 $this->dn['rdnSequence'][] = [
1682 if (empty($this->dn)) {
1690 $dn = &$this->dn['rdnSequence'];
1691 $size = count($dn);
1693 if ($dn[$i][0]['type'] == $propName) {
1694 unset($dn[$i]);
1698 $dn = array_values($dn);
1700 if (!isset($dn[0])) {
1701 $dn = array_splice($dn, 0, 0);
1709 * @param array $dn optional
1713 public function getDNProp($propName, array $dn = null, $withType = false)
1715 if (!isset($dn)) {
1716 $dn = $this->dn;
1719 if (empty($dn)) {
1730 $this->mapOutDNs($dn, 'rdnSequence');
1731 $dn = $dn['rdnSequence'];
1733 for ($i = 0; $i < count($dn); $i++) {
1734 if ($dn[$i][0]['type'] == $propName) {
1735 $v = $dn[$i][0]['value'];
1772 * @param mixed $dn
1777 public function setDN($dn, $merge = false, $type = 'utf8String')
1780 $this->dn = null;
1783 if (is_array($dn)) {
1784 if (isset($dn['rdnSequence'])) {
1785 $this->dn = $dn; // No merge here.
1790 foreach ($dn as $prop => $value) {
1799 $results = preg_split('#((?:^|, *|/)(?:C=|O=|OU=|CN=|L=|ST=|SN=|postalCode=|streetAddress=|emailAddress=|serialNumber=|organizationalUnitName=|title=|description=|role=|x500UniqueIdentifier=|postalAddress=))#', $dn, -1, PREG_SPLIT_DELIM_CAPTURE);
1815 * @param array $dn optional
1818 public function getDN($format = self::DN_ARRAY, array $dn = null)
1820 if (!isset($dn)) {
1821 $dn = isset($this->currentCert['tbsCertList']) ? $this->currentCert['tbsCertList']['issuer'] : $this->dn;
1826 return $dn;
1831 $this->mapOutDNs($dn, 'rdnSequence');
1832 return ASN1::encodeDER($dn, Maps\Name::MAP);
1841 $this->mapOutDNs($dn, 'rdnSequence');
1842 foreach ($dn['rdnSequence'] as $rdn) {
1863 $dn = $this->getDN(self::DN_CANON, $dn);
1865 $hash = $hash->hash($dn);
1878 $this->mapOutDNs($dn, 'rdnSequence');
1880 foreach ($dn['rdnSequence'] as $field) {
1983 case !empty($this->dn):
2027 case !empty($this->dn):
2189 $this->dn = $csr['certificationRequestInfo']['subject'];
2190 if (!isset($this->dn)) {
2230 $this->dn = $csr['certificationRequestInfo']['subject'];
2551 if (!is_object($issuer->privateKey) || empty($issuer->dn)) {
2577 if (!empty($subject->dn)) {
2578 $this->currentCert['tbsCertificate']['subject'] = $subject->dn;
2622 'subject' => $subject->dn,
2637 $this->currentCert['tbsCertificate']['issuer'] = $issuer->dn;
2643 // 'directoryName' => $issuer->dn
2733 if (!is_object($this->privateKey) || empty($this->dn)) {
2748 if (!empty($this->dn)) {
2749 $this->currentCert['certificationRequestInfo']['subject'] = $this->dn;
2757 'subject' => $this->dn,
2849 if (!is_object($issuer->privateKey) || empty($issuer->dn)) {
2879 $tbsCertList['issuer'] = $issuer->dn;
2931 // 'directoryName' => $issuer->dn