kelunik/acme-client

--ttl option with auto command

Lodesys opened this issue · 3 comments

Seeing a potential problem where the --ttl option appears to be ignored with the auto command.

From what I can see from the code, it looks like the ttl value is not being passed to the check request within the checkAndIssue function.

When running commands manually, i get...

C:\.....\ssl.le>php acme-client.phar check --name www.doneworking.com

Certificate is valid until 24.07.2017

C:\.....\ssl.le>echo %errorlevel%
0

C:\.....\ssl.le>php acme-client.phar check --name www.doneworking.com --ttl 45

Certificate is valid until 24.07.2017

Certificate is going to expire within the specified 45 days.

C:\.....\ssl.le>echo %errorlevel%
1

C:\.....\ssl.le>php acme-client.phar auto --ttl 45

C:\.....\ssl.le>echo %errorlevel%
0

0 = Nothing to do, all certs still valid

My guess is that the check call within checkAndIssue is not seeing the ttl value.

I'll have to check that, but I think the exit code is anyway broken on Windows currently and is always 0.

Thanks for checking. Running a Windows server and the auto command exit code has always seemed to work for me. In any case, the certs are not renewing with --ttl 45

The option isn't ignored, there's just no such option and the client ignores invalid arguments.