No 204 Code on Nonce Check


#1

Trying to load new certificates in a Laravel App using a repo https://github.com/stonemax/acme2/ to load certificates. With staging true we now get this error locally as well as on staging server:

php artisan ssl-controller:update-certificate test.com true
Certificate updating now.
+ Starting ...

In NonceService.php line 89:

  Get new nonce failed, the url is: https://acme-v02.api.letsencrypt.org/acme/new-nonce

Checking https://github.com/stonemax/acme2/blob/218bfa99371c88592833bc0d397ad8b0f8960e05/src/services/NonceService.php we see that a 204 seems to not take place

private function getNew()
    {
        $newNonceUrl = Client::$runtime->endpoint->newNonce;
        list($code, $header, ) = RequestHelper::head($newNonceUrl);
        if ($code != 204)
        {
            throw new NonceException("Get new nonce failed, the url is: {$newNonceUrl}");
        }
        $nonce = CommonHelper::getNonceFromResponseHeader($header);
        if (!$nonce)
        {
            throw new NonceException("Get new nonce failed, the header doesn't contain `Replay-Nonce` filed, the url is: {$newNonceUrl}");
        }
        return $nonce;
    }

Any idea why this would happen?


#2

The 204 was never to spec.

You can get email notifications for any posts in that forum, it’s a really valuable thing to do as a client developer.


#3

@_az I will subscribe. This as we will be using ACME2 / LE a lot in the near future. Thanks for the feedback. Appreciate it a lot!