From 451a21a5054a6323ae8255375b3e5adae0157b5a Mon Sep 17 00:00:00 2001 From: peterbakker Date: Wed, 18 Mar 2020 19:40:19 +0100 Subject: [PATCH] Added selftest method to README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64ebb35..7e631d3 100644 --- a/README.md +++ b/README.md @@ -107,11 +107,14 @@ challenge. ```php foreach ($authorizations as $authorization) { - $client->validate($authorization->getHttpChallenge(), 15); + if ($client->selfTest($authorization, Client::VALIDATION_HTTP)) { + $client->validate($authorization->getHttpChallenge(), 15); + } + } ``` -The method above will perform 15 attempts to ask LetsEncrypt to validate the challenge (with 1 second intervals) and +The code above will first perform a self test and, if successful, will do 15 attempts to ask LetsEncrypt to validate the challenge (with 1 second intervals) and retrieve an updated status (it might take Lets Encrypt a few seconds to validate the challenge). ### Get the certificate