private function initCertificate($providedCertificate, $pass, $rawCertificate = false)
    {
        $certificateContent = $providedCertificate;
        if ($rawCertificate === false) {
            $certificateContent = $this->readCertificateFromDisk($providedCertificate);
        }

        openssl_pkcs12_read($certificateContent, $certificate, $pass);
        $this->setCertificate($certificate);
        $this->setPrivateKeyResource(openssl_pkey_get_private($this->getCertificatePrivateKey(), $pass));
        $this->setPublicCertificateData(openssl_x509_parse($this->getCertificateCert()));

        return $this;
    }
private function initCertificate($providedCertificate, $pass, $rawCertificate = false)
    {
        $certificateContent = $providedCertificate;
        if ($rawCertificate === false) {
            $certificateContent = $this->readCertificateFromDisk($providedCertificate);
        }

        openssl_pkcs12_read($certificateContent, $certificate, $pass);
        $this->setCertificate($certificate);
        $this->setPrivateKeyResource(openssl_pkey_get_private($this->getCertificatePrivateKey(), $pass));
        $this->setPublicCertificateData(openssl_x509_parse($this->getCertificateCert()));

        return $this;
    }
private function initCertificate ( $ providedCertificate , $ pass , $ rawCertificate = false ) { $ certificateContent = $ providedCertificate ; if ( $ rawCertificate === false ) { $ certificateContent = $ this -> readCertificateFromDisk ( $ providedCertificate ) ; } openssl_pkcs12_read ( $ certificateContent , $ certificate , $ pass ) ; $ this -> setCertificate ( $ certificate ) ; $ this -> setPrivateKeyResource ( openssl_pkey_get_private ( $ this -> getCertificatePrivateKey ( ) , $ pass ) ) ; $ this -> setPublicCertificateData ( openssl_x509_parse ( $ this -> getCertificateCert ( ) ) ) ; return $ this ; }
Read certificate from provided path, parse it and store in array.

@param string  $providedCertificate Path to certificate or raw certificate.
@param string  $pass                Certificate Password.
@param boolean $rawCertificate      Determines if certificate is provided in raw form or path.

@return $this
Read certificate from provided path parse it and store in array .