Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8944aee552 | ||
|
|
5b2c47c30f | ||
|
|
ecb46af5c0 | ||
|
|
253d3f476b | ||
|
|
c6d9c2016c | ||
|
|
b4d4da7a51 | ||
|
|
0d61689da1 | ||
|
|
349a12aae6 | ||
|
|
28ae97f135 | ||
|
|
0fc0e45e57 | ||
|
|
9356a060e7 | ||
|
|
b4a722c0a9 | ||
|
|
2f73c15287 | ||
|
|
05a6f6d861 | ||
|
|
d5fdc1a3c0 | ||
|
|
cc76a6f52c | ||
|
|
74b275cf07 | ||
|
|
e9d2a59eca | ||
|
|
b9d79bbbe7 |
5
bin/acme
5
bin/acme
@@ -80,6 +80,11 @@ if (!in_array(PHP_SAPI, ["cli", "phpdbg"], true)) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (PHP_VERSION_ID < 50600) {
|
||||
$climate->yellow("You're using an older version of PHP which is no longer supported and will not even receive security fixes anymore. Have a look at http://php.net/supported-versions.php and upgrade now!");
|
||||
$climate->br(2);
|
||||
}
|
||||
|
||||
if (count($argv) === 1 || in_array($argv[1], ["-h", "help", "--help"], true)) {
|
||||
$climate->out($logo . $help);
|
||||
exit(0);
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5",
|
||||
"fabpot/php-cs-fixer": "^1.9",
|
||||
"macfja/phar-builder": "dev-events-dev-files"
|
||||
"friendsofphp/php-cs-fixer": "^1.9",
|
||||
"macfja/phar-builder": "^0.2.5"
|
||||
},
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
|
||||
384
composer.lock
generated
384
composer.lock
generated
@@ -4,8 +4,8 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "f645228f022f95d362e3cfa543321bd7",
|
||||
"content-hash": "af2e73ef42c235311d53fcf4eb5aa5ab",
|
||||
"hash": "c1f8c0b5b34063a785f81d0045483b69",
|
||||
"content-hash": "da36b1d8f2a36563f1cfa33c172cb3c4",
|
||||
"packages": [
|
||||
{
|
||||
"name": "amphp/amp",
|
||||
@@ -66,16 +66,16 @@
|
||||
},
|
||||
{
|
||||
"name": "amphp/artax",
|
||||
"version": "v2.0.3",
|
||||
"version": "v2.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/artax.git",
|
||||
"reference": "cc665ac890322188bad8b80722d64af6207b770d"
|
||||
"reference": "1795ed4076469546f79804b348ffd6dd77656f73"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/artax/zipball/cc665ac890322188bad8b80722d64af6207b770d",
|
||||
"reference": "cc665ac890322188bad8b80722d64af6207b770d",
|
||||
"url": "https://api.github.com/repos/amphp/artax/zipball/1795ed4076469546f79804b348ffd6dd77656f73",
|
||||
"reference": "1795ed4076469546f79804b348ffd6dd77656f73",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -84,7 +84,7 @@
|
||||
"php": ">=5.5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fabpot/php-cs-fixer": "~1.9",
|
||||
"friendsofphp/php-cs-fixer": "~1.9",
|
||||
"phpunit/phpunit": "~4.8"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -120,7 +120,7 @@
|
||||
"parallel",
|
||||
"rest"
|
||||
],
|
||||
"time": "2016-03-09 11:33:42"
|
||||
"time": "2016-08-08 16:27:01"
|
||||
},
|
||||
{
|
||||
"name": "amphp/cache",
|
||||
@@ -240,16 +240,16 @@
|
||||
},
|
||||
{
|
||||
"name": "amphp/file",
|
||||
"version": "v0.1.2",
|
||||
"version": "v0.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/file.git",
|
||||
"reference": "7e04d6badea1f904cb1b894771f9c7e073799874"
|
||||
"reference": "6612ae6757d4719492ed8b34ea6181ff67cfbed1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/file/zipball/7e04d6badea1f904cb1b894771f9c7e073799874",
|
||||
"reference": "7e04d6badea1f904cb1b894771f9c7e073799874",
|
||||
"url": "https://api.github.com/repos/amphp/file/zipball/6612ae6757d4719492ed8b34ea6181ff67cfbed1",
|
||||
"reference": "6612ae6757d4719492ed8b34ea6181ff67cfbed1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -257,13 +257,14 @@
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"fabpot/php-cs-fixer": "~1.9",
|
||||
"friendsofphp/php-cs-fixer": "~1.9",
|
||||
"phpunit/phpunit": "~4.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "0.1.0-dev"
|
||||
"dev-master": "0.1.0-dev",
|
||||
"dev-amp_v2": "0.2.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -295,20 +296,20 @@
|
||||
"non-blocking",
|
||||
"static"
|
||||
],
|
||||
"time": "2016-03-24 17:31:44"
|
||||
"time": "2016-10-01 17:43:52"
|
||||
},
|
||||
{
|
||||
"name": "amphp/process",
|
||||
"version": "v0.1.2",
|
||||
"version": "v0.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/process.git",
|
||||
"reference": "255325ca82a92b05974efce27e9b92b2155fc408"
|
||||
"reference": "f22cca2af36e442b771c0de2e24e8025550d8ffc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/process/zipball/255325ca82a92b05974efce27e9b92b2155fc408",
|
||||
"reference": "255325ca82a92b05974efce27e9b92b2155fc408",
|
||||
"url": "https://api.github.com/repos/amphp/process/zipball/f22cca2af36e442b771c0de2e24e8025550d8ffc",
|
||||
"reference": "f22cca2af36e442b771c0de2e24e8025550d8ffc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -338,20 +339,20 @@
|
||||
],
|
||||
"description": "Asynchronous process manager",
|
||||
"homepage": "https://github.com/amphp/process",
|
||||
"time": "2015-12-24 12:44:49"
|
||||
"time": "2016-09-24 10:49:26"
|
||||
},
|
||||
{
|
||||
"name": "amphp/socket",
|
||||
"version": "v0.9.8",
|
||||
"version": "v0.9.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/socket.git",
|
||||
"reference": "bdc72fc545e6dcee444419d98eea80875bffc806"
|
||||
"reference": "722614608c1de7099661187fad4e15c876816db1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/socket/zipball/bdc72fc545e6dcee444419d98eea80875bffc806",
|
||||
"reference": "bdc72fc545e6dcee444419d98eea80875bffc806",
|
||||
"url": "https://api.github.com/repos/amphp/socket/zipball/722614608c1de7099661187fad4e15c876816db1",
|
||||
"reference": "722614608c1de7099661187fad4e15c876816db1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -393,7 +394,7 @@
|
||||
"tcp",
|
||||
"tls"
|
||||
],
|
||||
"time": "2016-06-19 20:16:19"
|
||||
"time": "2016-07-18 22:03:24"
|
||||
},
|
||||
{
|
||||
"name": "daverandom/libdns",
|
||||
@@ -647,16 +648,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "3d265f7c079f5b37d33475f996d7a383c5fc8aeb"
|
||||
"reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/3d265f7c079f5b37d33475f996d7a383c5fc8aeb",
|
||||
"reference": "3d265f7c079f5b37d33475f996d7a383c5fc8aeb",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/ab8028c93c03cc8d9c824efa75dc94f1db2369bf",
|
||||
"reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -735,7 +736,7 @@
|
||||
"x.509",
|
||||
"x509"
|
||||
],
|
||||
"time": "2016-05-13 01:15:21"
|
||||
"time": "2016-10-04 00:57:04"
|
||||
},
|
||||
{
|
||||
"name": "rdlowrey/auryn",
|
||||
@@ -1007,16 +1008,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v3.1.1",
|
||||
"version": "v3.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623"
|
||||
"reference": "368b9738d4033c8b93454cb0dbd45d305135a6d3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/c5a7e7fc273c758b92b85dcb9c46149ccda89623",
|
||||
"reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/368b9738d4033c8b93454cb0dbd45d305135a6d3",
|
||||
"reference": "368b9738d4033c8b93454cb0dbd45d305135a6d3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1052,32 +1053,33 @@
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2016-06-14 11:18:07"
|
||||
"time": "2016-09-25 08:27:07"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webmozart/assert.git",
|
||||
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde"
|
||||
"reference": "bb2d123231c095735130cc8f6d31385a44c7b308"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
|
||||
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308",
|
||||
"reference": "bb2d123231c095735130cc8f6d31385a44c7b308",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
"php": "^5.3.3|^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.6"
|
||||
"phpunit/phpunit": "^4.6",
|
||||
"sebastian/version": "^1.0.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
"dev-master": "1.2-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1101,7 +1103,7 @@
|
||||
"check",
|
||||
"validate"
|
||||
],
|
||||
"time": "2015-08-24 13:29:44"
|
||||
"time": "2016-08-09 15:02:57"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@@ -1160,17 +1162,17 @@
|
||||
"time": "2015-06-14 21:17:01"
|
||||
},
|
||||
{
|
||||
"name": "fabpot/php-cs-fixer",
|
||||
"version": "v1.11.4",
|
||||
"name": "friendsofphp/php-cs-fixer",
|
||||
"version": "v1.11.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
|
||||
"reference": "eeb280e909834603ffe03524dbe0066e77c83084"
|
||||
"reference": "117137e9970054d022b7656209f094dab852b90c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/eeb280e909834603ffe03524dbe0066e77c83084",
|
||||
"reference": "eeb280e909834603ffe03524dbe0066e77c83084",
|
||||
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/117137e9970054d022b7656209f094dab852b90c",
|
||||
"reference": "117137e9970054d022b7656209f094dab852b90c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1184,8 +1186,12 @@
|
||||
"symfony/process": "~2.3|~3.0",
|
||||
"symfony/stopwatch": "~2.5|~3.0"
|
||||
},
|
||||
"conflict": {
|
||||
"hhvm": "<3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"satooshi/php-coveralls": "0.7.*@dev"
|
||||
"phpunit/phpunit": "^4.5|^5",
|
||||
"satooshi/php-coveralls": "^0.7.1"
|
||||
},
|
||||
"bin": [
|
||||
"php-cs-fixer"
|
||||
@@ -1211,8 +1217,7 @@
|
||||
}
|
||||
],
|
||||
"description": "A tool to automatically fix PHP code style",
|
||||
"abandoned": "friendsofphp/php-cs-fixer",
|
||||
"time": "2016-06-07 07:51:27"
|
||||
"time": "2016-08-16 23:31:05"
|
||||
},
|
||||
{
|
||||
"name": "league/event",
|
||||
@@ -1266,16 +1271,16 @@
|
||||
},
|
||||
{
|
||||
"name": "macfja/phar-builder",
|
||||
"version": "dev-events-dev-files",
|
||||
"version": "0.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kelunik/PharBuilder.git",
|
||||
"reference": "ca02acf19255255f8bc0f490caaf9c086e64062b"
|
||||
"url": "https://github.com/MacFJA/PharBuilder.git",
|
||||
"reference": "0a5270b565242a99371ff94d2ebecb85b2854a1d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/kelunik/PharBuilder/zipball/ca02acf19255255f8bc0f490caaf9c086e64062b",
|
||||
"reference": "ca02acf19255255f8bc0f490caaf9c086e64062b",
|
||||
"url": "https://api.github.com/repos/MacFJA/PharBuilder/zipball/0a5270b565242a99371ff94d2ebecb85b2854a1d",
|
||||
"reference": "0a5270b565242a99371ff94d2ebecb85b2854a1d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1314,14 +1319,7 @@
|
||||
"MacFJA\\PharBuilder\\": "app/"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test": [
|
||||
"php -l app/",
|
||||
"phpmd app/ text phpmd.xml.dist",
|
||||
"phpcpd app/",
|
||||
"phpcs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
@@ -1331,10 +1329,7 @@
|
||||
}
|
||||
],
|
||||
"description": "CLI tool for create phar of your composer based project",
|
||||
"support": {
|
||||
"source": "https://github.com/kelunik/PharBuilder/tree/events-dev-files"
|
||||
},
|
||||
"time": "2016-06-02 19:28:27"
|
||||
"time": "2016-08-07 12:35:14"
|
||||
},
|
||||
{
|
||||
"name": "macfja/symfony-console-filechooser",
|
||||
@@ -1384,16 +1379,16 @@
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||
"reference": "a8773992b362b58498eed24bf85005f363c34771"
|
||||
"reference": "ea74994a3dc7f8d2f65a06009348f2d63c81e61f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a8773992b362b58498eed24bf85005f363c34771",
|
||||
"reference": "a8773992b362b58498eed24bf85005f363c34771",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/ea74994a3dc7f8d2f65a06009348f2d63c81e61f",
|
||||
"reference": "ea74994a3dc7f8d2f65a06009348f2d63c81e61f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1422,7 +1417,7 @@
|
||||
"object",
|
||||
"object graph"
|
||||
],
|
||||
"time": "2015-11-20 12:04:31"
|
||||
"time": "2016-09-16 13:37:59"
|
||||
},
|
||||
{
|
||||
"name": "neutron/signal-handler",
|
||||
@@ -1523,16 +1518,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd"
|
||||
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd",
|
||||
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
|
||||
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1564,7 +1559,7 @@
|
||||
}
|
||||
],
|
||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||
"time": "2016-06-10 09:48:41"
|
||||
"time": "2016-09-30 07:12:33"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
@@ -1677,16 +1672,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "900370c81280cc0d942ffbc5912d80464eaee7e9"
|
||||
"reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/900370c81280cc0d942ffbc5912d80464eaee7e9",
|
||||
"reference": "900370c81280cc0d942ffbc5912d80464eaee7e9",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5f3f7e736d6319d5f1fc402aff8b026da26709a3",
|
||||
"reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1695,7 +1690,7 @@
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-token-stream": "^1.4.2",
|
||||
"sebastian/code-unit-reverse-lookup": "~1.0",
|
||||
"sebastian/environment": "^1.3.2",
|
||||
"sebastian/environment": "^1.3.2 || ^2.0",
|
||||
"sebastian/version": "~1.0|~2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -1736,7 +1731,7 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2016-06-03 05:03:56"
|
||||
"time": "2016-07-26 14:39:29"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
@@ -1921,28 +1916,28 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "5.4.6",
|
||||
"version": "5.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59"
|
||||
"reference": "60c32c5b5e79c2248001efa2560f831da11cc2d7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2f1fc94b77ea6418bd6a06c64a1dac0645fbce59",
|
||||
"reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/60c32c5b5e79c2248001efa2560f831da11cc2d7",
|
||||
"reference": "60c32c5b5e79c2248001efa2560f831da11cc2d7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-reflection": "*",
|
||||
"ext-spl": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-xml": "*",
|
||||
"myclabs/deep-copy": "~1.3",
|
||||
"php": "^5.6 || ^7.0",
|
||||
"phpspec/prophecy": "^1.3.1",
|
||||
"phpunit/php-code-coverage": "^4.0",
|
||||
"phpunit/php-code-coverage": "^4.0.1",
|
||||
"phpunit/php-file-iterator": "~1.4",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-timer": "^1.0.6",
|
||||
@@ -1960,7 +1955,11 @@
|
||||
"conflict": {
|
||||
"phpdocumentor/reflection-docblock": "3.0.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-pdo": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-xdebug": "*",
|
||||
"phpunit/php-invoker": "~1.1"
|
||||
},
|
||||
"bin": [
|
||||
@@ -1969,7 +1968,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.4.x-dev"
|
||||
"dev-master": "5.6.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1995,20 +1994,20 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2016-06-16 06:01:15"
|
||||
"time": "2016-10-07 13:03:26"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
"version": "3.2.3",
|
||||
"version": "3.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
||||
"reference": "b13d0d9426ced06958bd32104653526a6c998a52"
|
||||
"reference": "238d7a2723bce689c79eeac9c7d5e1d623bb9dc2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b13d0d9426ced06958bd32104653526a6c998a52",
|
||||
"reference": "b13d0d9426ced06958bd32104653526a6c998a52",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/238d7a2723bce689c79eeac9c7d5e1d623bb9dc2",
|
||||
"reference": "238d7a2723bce689c79eeac9c7d5e1d623bb9dc2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2054,7 +2053,54 @@
|
||||
"mock",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2016-06-12 07:37:26"
|
||||
"time": "2016-10-09 07:01:45"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Log\\": "Psr/Log/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for logging libraries",
|
||||
"homepage": "https://github.com/php-fig/log",
|
||||
"keywords": [
|
||||
"log",
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2016-10-10 12:19:37"
|
||||
},
|
||||
{
|
||||
"name": "rych/bytesize",
|
||||
@@ -2264,23 +2310,23 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
"version": "1.3.7",
|
||||
"version": "1.3.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||
"reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716"
|
||||
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716",
|
||||
"reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
|
||||
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
"php": "^5.3.3 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
"phpunit/phpunit": "^4.8 || ^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -2310,7 +2356,7 @@
|
||||
"environment",
|
||||
"hhvm"
|
||||
],
|
||||
"time": "2016-05-17 03:18:57"
|
||||
"time": "2016-08-18 05:49:44"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
@@ -2616,20 +2662,21 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v2.8.7",
|
||||
"version": "v2.8.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3"
|
||||
"reference": "d7a5a88178f94dcc29531ea4028ea614e35452d4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3",
|
||||
"reference": "5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/d7a5a88178f94dcc29531ea4028ea614e35452d4",
|
||||
"reference": "d7a5a88178f94dcc29531ea4028ea614e35452d4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.9",
|
||||
"symfony/debug": "~2.7,>=2.7.2|~3.0.0",
|
||||
"symfony/polyfill-mbstring": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -2672,20 +2719,77 @@
|
||||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2016-06-06 15:06:25"
|
||||
"time": "2016-09-28 00:10:16"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v3.1.1",
|
||||
"name": "symfony/debug",
|
||||
"version": "v3.0.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
"reference": "f5b7563f67779c6d3d5370e23448e707c858df3e"
|
||||
"url": "https://github.com/symfony/debug.git",
|
||||
"reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f5b7563f67779c6d3d5370e23448e707c858df3e",
|
||||
"reference": "f5b7563f67779c6d3d5370e23448e707c858df3e",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a",
|
||||
"reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"psr/log": "~1.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/class-loader": "~2.8|~3.0",
|
||||
"symfony/http-kernel": "~2.8|~3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Debug\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2016-07-30 07:22:48"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v3.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
"reference": "c0c00c80b3a69132c4e55c3e7db32b4a387615e5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c0c00c80b3a69132c4e55c3e7db32b4a387615e5",
|
||||
"reference": "c0c00c80b3a69132c4e55c3e7db32b4a387615e5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2732,20 +2836,20 @@
|
||||
],
|
||||
"description": "Symfony EventDispatcher Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2016-06-06 11:42:41"
|
||||
"time": "2016-07-19 10:45:57"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v3.1.1",
|
||||
"version": "v3.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/filesystem.git",
|
||||
"reference": "5751e80d6f94b7c018f338a4a7be0b700d6f3058"
|
||||
"reference": "682fd8fdb3135fdf05fc496a01579ccf6c85c0e5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/5751e80d6f94b7c018f338a4a7be0b700d6f3058",
|
||||
"reference": "5751e80d6f94b7c018f338a4a7be0b700d6f3058",
|
||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/682fd8fdb3135fdf05fc496a01579ccf6c85c0e5",
|
||||
"reference": "682fd8fdb3135fdf05fc496a01579ccf6c85c0e5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2781,20 +2885,20 @@
|
||||
],
|
||||
"description": "Symfony Filesystem Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2016-04-12 18:27:47"
|
||||
"time": "2016-09-14 00:18:46"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v2.8.7",
|
||||
"version": "v2.8.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
"reference": "3ec095fab1800222732ca522a95dce8fa124007b"
|
||||
"reference": "bc24c8f5674c6f6841f2856b70e5d60784be5691"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/3ec095fab1800222732ca522a95dce8fa124007b",
|
||||
"reference": "3ec095fab1800222732ca522a95dce8fa124007b",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/bc24c8f5674c6f6841f2856b70e5d60784be5691",
|
||||
"reference": "bc24c8f5674c6f6841f2856b70e5d60784be5691",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2830,7 +2934,7 @@
|
||||
],
|
||||
"description": "Symfony Finder Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2016-06-06 11:11:27"
|
||||
"time": "2016-09-28 00:10:16"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
@@ -2893,16 +2997,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v3.1.1",
|
||||
"version": "v3.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "6350e63ed9c232da50e00f00a7e0330f066387a2"
|
||||
"reference": "66de154ae86b1a07001da9fbffd620206e4faf94"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/6350e63ed9c232da50e00f00a7e0330f066387a2",
|
||||
"reference": "6350e63ed9c232da50e00f00a7e0330f066387a2",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/66de154ae86b1a07001da9fbffd620206e4faf94",
|
||||
"reference": "66de154ae86b1a07001da9fbffd620206e4faf94",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2938,20 +3042,20 @@
|
||||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2016-06-06 11:42:41"
|
||||
"time": "2016-09-29 14:13:09"
|
||||
},
|
||||
{
|
||||
"name": "symfony/stopwatch",
|
||||
"version": "v3.1.1",
|
||||
"version": "v3.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/stopwatch.git",
|
||||
"reference": "e7238f98c90b99e9b53f3674a91757228663b04d"
|
||||
"reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/e7238f98c90b99e9b53f3674a91757228663b04d",
|
||||
"reference": "e7238f98c90b99e9b53f3674a91757228663b04d",
|
||||
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/bb42806b12c5f89db4ebf64af6741afe6d8457e1",
|
||||
"reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2987,7 +3091,7 @@
|
||||
],
|
||||
"description": "Symfony Stopwatch Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2016-06-06 11:42:41"
|
||||
"time": "2016-06-29 05:41:56"
|
||||
},
|
||||
{
|
||||
"name": "webignition/readable-duration",
|
||||
@@ -3035,9 +3139,7 @@
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": {
|
||||
"macfja/phar-builder": 20
|
||||
},
|
||||
"stability-flags": [],
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
|
||||
17
doc/usage.md
17
doc/usage.md
@@ -41,8 +41,10 @@ certificates:
|
||||
# Required: paths
|
||||
# Optional: bits, user
|
||||
#
|
||||
# paths: Map of document roots to domains.
|
||||
# /tmp is used here for domains without a real document root.
|
||||
# paths: Map of document roots to domains. Maps each path to one or multiple
|
||||
# domains. If one domain is given, it's automatically converted to an
|
||||
# array. The first domain will be the common name.
|
||||
#
|
||||
# The client will place a file into $path/.well-known/acme-challenge/
|
||||
# to verify ownership to the CA
|
||||
#
|
||||
@@ -53,9 +55,9 @@ certificates:
|
||||
#
|
||||
- bits: 4096
|
||||
paths:
|
||||
/tmp:
|
||||
- docs.example.org
|
||||
- git.example.org
|
||||
/var/www/example:
|
||||
- example.org
|
||||
- www.example.org
|
||||
# You can have multiple certificate with different users and key options.
|
||||
- user: www-data
|
||||
paths:
|
||||
@@ -75,9 +77,10 @@ the script will be quiet to be cron friendly. If an error occurs, the script wil
|
||||
You should execute `acme-client auto` as a daily cron. It's recommended to setup e-mail notifications for all output of
|
||||
that script.
|
||||
|
||||
```bash
|
||||
0 0 * * * acme-client auto; exit=$?; if [[ $exit = 4 ]] || [[ $exit = 5 ]]; then service nginx reload; fi
|
||||
```sh
|
||||
0 0 * * * /usr/local/sbin/acme-client auto; RC=$?; if [ $RC = 4 ] || [ $RC = 5 ]; then /usr/sbin/service nginx reload; fi
|
||||
```
|
||||
The path to `acme-client` should be modified to suit your system. The full path should be used as the system path may not be set up in your cron environment.
|
||||
|
||||
| Exit Code | Description |
|
||||
|-----------|-------------|
|
||||
|
||||
@@ -37,8 +37,6 @@ class Auto implements Command {
|
||||
* @return \Generator
|
||||
*/
|
||||
private function doExecute(Manager $args) {
|
||||
$server = $args->get("server");
|
||||
$storage = $args->get("storage");
|
||||
$configPath = $args->get("config");
|
||||
|
||||
try {
|
||||
@@ -55,6 +53,30 @@ class Auto implements Command {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($args->defined("server")) {
|
||||
$config["server"] = $args->get("server");
|
||||
} else if (!isset($config["server"]) && $args->exists("server")) {
|
||||
$config["server"] = $args->get("server");
|
||||
}
|
||||
|
||||
if ($args->defined("storage")) {
|
||||
$config["storage"] = $args->get("storage");
|
||||
} else if (!isset($config["storage"]) && $args->exists("storage")) {
|
||||
$config["storage"] = $args->get("storage");
|
||||
}
|
||||
|
||||
if (!isset($config["server"])) {
|
||||
$this->climate->error("Config file ({$configPath}) didn't have a 'server' set nor was it passed as command line argument.");
|
||||
yield new CoroutineResult(self::EXIT_CONFIG_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($config["storage"])) {
|
||||
$this->climate->error("Config file ({$configPath}) didn't have a 'storage' set nor was it passed as command line argument.");
|
||||
yield new CoroutineResult(self::EXIT_CONFIG_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($config["email"])) {
|
||||
$this->climate->error("Config file ({$configPath}) didn't have a 'email' set.");
|
||||
yield new CoroutineResult(self::EXIT_CONFIG_ERROR);
|
||||
@@ -72,9 +94,9 @@ class Auto implements Command {
|
||||
$GLOBALS["argv"][0],
|
||||
"setup",
|
||||
"--server",
|
||||
$server,
|
||||
$config["server"],
|
||||
"--storage",
|
||||
$storage,
|
||||
$config["storage"],
|
||||
"--email",
|
||||
$config["email"],
|
||||
]));
|
||||
@@ -100,7 +122,7 @@ class Auto implements Command {
|
||||
$promises = [];
|
||||
|
||||
foreach ($certificateChunk as $certificate) {
|
||||
$promises[] = \Amp\resolve($this->checkAndIssue($certificate, $server, $storage));
|
||||
$promises[] = \Amp\resolve($this->checkAndIssue($certificate, $config["server"], $config["storage"]));
|
||||
}
|
||||
|
||||
list($chunkErrors, $chunkValues) = (yield \Amp\any($promises));
|
||||
@@ -167,6 +189,8 @@ class Auto implements Command {
|
||||
$storage,
|
||||
"--name",
|
||||
$commonName,
|
||||
"--names",
|
||||
implode(",", $domains),
|
||||
];
|
||||
|
||||
$command = implode(" ", array_map("escapeshellarg", $args));
|
||||
@@ -277,9 +301,15 @@ MESSAGE;
|
||||
}
|
||||
|
||||
public static function getDefinition() {
|
||||
$server = \Kelunik\AcmeClient\getArgumentDescription("server");
|
||||
$storage = \Kelunik\AcmeClient\getArgumentDescription("storage");
|
||||
|
||||
$server["required"] = false;
|
||||
$storage["required"] = false;
|
||||
|
||||
$args = [
|
||||
"server" => \Kelunik\AcmeClient\getArgumentDescription("server"),
|
||||
"storage" => \Kelunik\AcmeClient\getArgumentDescription("storage"),
|
||||
"server" => $server,
|
||||
"storage" => $storage,
|
||||
"config" => [
|
||||
"prefix" => "c",
|
||||
"longPrefix" => "config",
|
||||
|
||||
@@ -45,6 +45,18 @@ class Check implements Command {
|
||||
$this->climate->br();
|
||||
$this->climate->whisper(" Certificate is valid until " . date("d.m.Y", $cert->getValidTo()))->br();
|
||||
|
||||
if ($args->defined("names")) {
|
||||
$names = array_map("trim", explode(",", $args->get("names")));
|
||||
$missingNames = array_diff($names, $cert->getNames());
|
||||
|
||||
if ($missingNames) {
|
||||
$this->climate->comment(" The following names are not covered: " . implode(", ", $missingNames))->br();
|
||||
|
||||
yield new CoroutineResult(1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ($cert->getValidTo() > time() + $args->get("ttl") * 24 * 60 * 60) {
|
||||
yield new CoroutineResult(0);
|
||||
return;
|
||||
@@ -70,6 +82,11 @@ class Check implements Command {
|
||||
"defaultValue" => 30,
|
||||
"castTo" => "int",
|
||||
],
|
||||
"names" => [
|
||||
"longPrefix" => "names",
|
||||
"description" => "Names that must be covered by the certificate identified based on the common name. Names have to be separated by commas.",
|
||||
"required" => false,
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -80,14 +80,22 @@ class Issue implements Command {
|
||||
$this->climate->br();
|
||||
|
||||
$acme = $this->acmeFactory->build($server, $keyPair);
|
||||
$promises = [];
|
||||
$errors = [];
|
||||
|
||||
foreach ($domains as $i => $domain) {
|
||||
$promises[] = \Amp\resolve($this->solveChallenge($acme, $keyPair, $domain, $docRoots[$i]));
|
||||
$domainChunks = array_chunk($domains, 10, true);
|
||||
|
||||
foreach ($domainChunks as $domainChunk) {
|
||||
$promises = [];
|
||||
|
||||
foreach ($domainChunk as $i => $domain) {
|
||||
$promises[] = \Amp\resolve($this->solveChallenge($acme, $keyPair, $domain, $docRoots[$i]));
|
||||
}
|
||||
|
||||
list($chunkErrors) = (yield \Amp\any($promises));
|
||||
|
||||
$errors += $chunkErrors;
|
||||
}
|
||||
|
||||
list($errors) = (yield \Amp\any($promises));
|
||||
|
||||
if (!empty($errors)) {
|
||||
foreach ($errors as $error) {
|
||||
$this->climate->error($error->getMessage());
|
||||
@@ -145,7 +153,7 @@ class Issue implements Command {
|
||||
$challengeStore = new ChallengeStore($path);
|
||||
|
||||
try {
|
||||
$challengeStore->put($token, $payload, isset($user) ? $user : null);
|
||||
yield $challengeStore->put($token, $payload, isset($user) ? $user : null);
|
||||
|
||||
yield $acme->verifyHttp01Challenge($domain, $token, $payload);
|
||||
yield $acme->answerChallenge($challenge->uri, $payload);
|
||||
@@ -166,19 +174,27 @@ class Issue implements Command {
|
||||
}
|
||||
|
||||
private function checkDnsRecords($domains) {
|
||||
$promises = [];
|
||||
$errors = [];
|
||||
|
||||
foreach ($domains as $domain) {
|
||||
$promises[$domain] = \Amp\Dns\resolve($domain, [
|
||||
"types" => [Record::A],
|
||||
"hosts" => false,
|
||||
]);
|
||||
$domainChunks = array_chunk($domains, 10, true);
|
||||
|
||||
foreach ($domainChunks as $domainChunk) {
|
||||
$promises = [];
|
||||
|
||||
foreach ($domainChunk as $domain) {
|
||||
$promises[$domain] = \Amp\Dns\resolve($domain, [
|
||||
"types" => [Record::A, Record::AAAA],
|
||||
"hosts" => false,
|
||||
]);
|
||||
}
|
||||
|
||||
list($chunkErrors) = (yield \Amp\any($promises));
|
||||
|
||||
$errors += $chunkErrors;
|
||||
}
|
||||
|
||||
list($errors) = (yield \Amp\any($promises));
|
||||
|
||||
if (!empty($errors)) {
|
||||
throw new AcmeException("Couldn't resolve the following domains to an IPv4 record: " . implode(", ", array_keys($errors)));
|
||||
throw new AcmeException("Couldn't resolve the following domains to an IPv4 nor IPv6 record: " . implode(", ", array_keys($errors)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,4 +247,4 @@ class Issue implements Command {
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user