public function verify(int $purpose = X509_PURPOSE_ANY): bool {
        $chainFile = new TempFile();
        $chainFile->setContent($this);

        $certificate = $this[0];
        return $certificate->checkPurpose($purpose, [], $chainFile);
    }