Exemple #1
0
 public function testGetPathToIssuerCert()
 {
     vfsStream::setUp('root', null, array($nameOfClientCert = 'clientCert.pem' => '', $nameOfIssuerCert = 'issuerCert.pem' => ''));
     $pathToClientCert = vfsStream::url('root/' . $nameOfClientCert);
     $pathToIssuerCert = vfsStream::url('root/' . $nameOfIssuerCert);
     $request = new Request($pathToClientCert, $pathToIssuerCert);
     $this->assertEquals($pathToIssuerCert, $request->getPathToIssuerCert());
 }
Exemple #2
0
 /**
  * @param Request $request
  * @param string  $pathToResponse
  *
  * @return Process
  */
 private function createProcess(Request $request, $pathToResponse)
 {
     $commandLine = sprintf('openssl ocsp -issuer %s -cert %s -url %s -VAfile %s -respout %s', escapeshellarg($request->getPathToIssuerCert()), escapeshellarg($request->getPathToClientCert()), escapeshellarg($this->url), escapeshellarg($this->pathToCert), escapeshellarg($pathToResponse));
     $process = $this->process;
     $process->setCommandLine($commandLine);
     return $process;
 }