protected function ocspBasic($der) { $this->xtns->init($der); $this->xtns->beginsequence(); $res['tbsResponseData_der'] = $this->xtns->der(); $res['tbsResponseData'] = $this->tbsResponseData(); $res['signatureAlgorithm'] = $this->xtns->signatureAlgorithm(); $res['signature'] = $this->xtns->next(3); if ($this->xtns->peek() == 0) { $this->xtns->next(0); $this->xtns->beginsequence(); $x = new X509(); while ($this->xtns->in()) { $res['certs'][] = $x->certificate($this->xtns->der(null, true)); # get and continue past ... } $this->xtns->end(); } $this->xtns->end(); return $res; }