Пример #1
0
 public static function loadRootCertificatesFromFile($filePath)
 {
     if (!file_exists($filePath)) {
         throw new Exception("Unable to load Root certificates, file '{$filePath}' does not exist");
     }
     $fileContents = file_get_contents($filePath);
     $certificatesFound = Janus_OpenSsl_Certificate_Utility::getCertificatesFromText($fileContents);
     self::setRootCertificates($certificatesFound);
 }
Пример #2
0
 public function getServerCertificateChain()
 {
     $blocks = explode("\n---\n", $this->_connection->getOutput());
     $certificateOutput = $blocks[1];
     $certificatesFound = Janus_OpenSsl_Certificate_Utility::getCertificatesFromText($certificateOutput);
     return Janus_OpenSsl_Certificate_Chain_Factory::createFromCertificates($certificatesFound);
 }