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;
    }