Lines Matching refs:crl

1954      * Get the Distinguished Name for a certificate/crl issuer
1997 * Get an individual Distinguished Name property for a certificate/crl issuer
2399 * @param string $crl
2403 public function loadCRL($crl, $mode = self::FORMAT_AUTO_DETECT)
2405 if (is_array($crl) && isset($crl['tbsCertList'])) {
2406 $this->currentCert = $crl;
2408 return $crl;
2412 $newcrl = ASN1::extractBER($crl);
2413 if ($mode == self::FORMAT_PEM && $crl == $newcrl) {
2416 $crl = $newcrl;
2418 $orig = $crl;
2420 if ($crl === false) {
2425 $decoded = ASN1::decodeBER($crl);
2432 $crl = ASN1::asn1map($decoded[0], Maps\CertificateList::MAP);
2433 if (!isset($crl) || $crl === false) {
2440 $this->mapInDNs($crl, 'tbsCertList/issuer/rdnSequence');
2441 if ($this->isSubArrayValid($crl, 'tbsCertList/crlExtensions')) {
2442 $this->mapInExtensions($crl, 'tbsCertList/crlExtensions');
2444 if ($this->isSubArrayValid($crl, 'tbsCertList/revokedCertificates')) {
2445 $rclist_ref = &$this->subArrayUnchecked($crl, 'tbsCertList/revokedCertificates');
2447 $rclist = $crl['tbsCertList']['revokedCertificates'];
2457 $this->currentCert = $crl;
2459 return $crl;
2465 * @param array $crl
2469 public function saveCRL(array $crl, $format = self::FORMAT_PEM)
2471 if (!is_array($crl) || !isset($crl['tbsCertList'])) {
2483 if (empty($crl['tbsCertList']['signature']['parameters'])) {
2488 if (empty($crl['signatureAlgorithm']['parameters'])) {
2495 $this->mapOutDNs($crl, 'tbsCertList/issuer/rdnSequence');
2496 $this->mapOutExtensions($crl, 'tbsCertList/crlExtensions');
2497 $rclist = &$this->subArray($crl, 'tbsCertList/revokedCertificates');
2504 $crl = ASN1::encodeDER($crl, Maps\CertificateList::MAP);
2508 return $crl;
2511 return "-----BEGIN X509 CRL-----\r\n" . chunk_split(Strings::base64_encode($crl), 64) . '-----END X509 CRL-----';
2847 public function signCRL(X509 $issuer, X509 $crl)
2860 if (isset($crl->currentCert) && is_array($crl->currentCert) && isset($crl->currentCert['tbsCertList'])) {
2861 $this->currentCert = $crl->currentCert;
3853 * @param array $crl optional
3856 public function listRevoked(array $crl = null)
3858 if (!isset($crl)) {
3859 $crl = $this->currentCert;
3862 if (!isset($crl['tbsCertList'])) {
3868 if (is_array($rclist = $this->subArray($crl, 'tbsCertList/revokedCertificates'))) {
3902 * @param array $crl optional
3905 public function getRevokedCertificateExtension($serial, $id, array $crl = null)
3907 if (!isset($crl)) {
3908 $crl = $this->currentCert;
3911 if (is_array($rclist = $this->subArray($crl, 'tbsCertList/revokedCertificates'))) {
3913 return $this->getExtension($id, $crl, "tbsCertList/revokedCertificates/$i/crlEntryExtensions");
3924 * @param array $crl optional
3927 public function getRevokedCertificateExtensions($serial, array $crl = null)
3929 if (!isset($crl)) {
3930 $crl = $this->currentCert;
3933 if (is_array($rclist = $this->subArray($crl, 'tbsCertList/revokedCertificates'))) {
3935 return $this->getExtensions($crl, "tbsCertList/revokedCertificates/$i/crlEntryExtensions");