private function readCertificateFromDisk($path)
    {
        $cert = @file_get_contents($path);
        if ($cert === false) {
            throw new \Exception('Can not read certificate from location: '.$path, 1);
        }

        return $cert;
    }