public function revokeCertificate(string $pem): Promise {
        return call(function () use ($pem) {
            $begin = 'CERTIFICATE-----';
            $end = '----END';

            $pem = substr($pem, strpos($pem, $begin) + strlen($begin));
            $pem = substr($pem, 0, strpos($pem, $end));

            $enc = new Base64UrlSafeEncoder;

            /** @var Response $response */
            $response = yield $this->acmeClient->post(AcmeResource::REVOKE_CERTIFICATE, [
                'certificate' => $enc->encode(base64_decode($pem)),
            ]);

            if ($response->getStatus() === 200) {
                return true;
            }

            throw $this->generateException($response, yield $response->getBody());
        });
    }