public function getThumbprint()
    {
        $resource = openssl_x509_read($this->certificate);
        $thumbprint = null;
        $output = null;
        
        $result = openssl_x509_export($resource, $output);
        if ($result !== false) {
            $output = str_replace('-----BEGIN CERTIFICATE-----', '', $output);
            $output = str_replace('-----END CERTIFICATE-----', '', $output);
            $output = base64_decode($output);
            $thumbprint = sha1($output);
        }
        
        return $thumbprint;
    }