Jakub Warmuz
c57cd239c3
Register key creation before writing out.
2015-07-10 07:25:29 +00:00
Jakub Warmuz
4ebc20402b
Pin mock<1.1.0 (Python 2.6 support).
2015-07-10 07:21:07 +00:00
Jakub Warmuz
1d35946b4e
Fix PickPluginTest.test_no_defaults.
2015-07-10 06:51:09 +00:00
Jakub Warmuz
15f443dced
assert_called_once -> assertEqual(1, *.call_count)
2015-07-10 06:42:02 +00:00
Jakub Warmuz
56d8c60df6
Fix letsencrypt.tests.client_test.
2015-07-10 06:24:06 +00:00
Jakub Warmuz
0c46f80fdd
assert_callend_once -> assert_called_once
2015-07-10 05:44:21 +00:00
Jakub Warmuz
30a02d4487
Accounts: raise AccountStorageError on id mismatch (instead of assertion).
...
This allows find_all() to skip broken account, instead of failing with
AssertionError.
2015-07-10 05:34:33 +00:00
Jakub Warmuz
f4d5ce1986
Include Account.id in the Account.slug.
2015-07-10 05:27:01 +00:00
Jakub Warmuz
f24479ebfc
100% coverage for letsencrypt.account.
2015-07-10 05:17:24 +00:00
Jakub Warmuz
581875bde3
Account.id: use key md5 hexdigest.
2015-07-10 05:14:50 +00:00
Jakub Warmuz
517c9bd736
Fix new-regr -> new-reg typo
2015-07-09 19:04:41 +00:00
Jakub Warmuz
35c21d4cf4
Enforce "resource" field in request objects.
...
Corresponds to:
- https://github.com/letsencrypt/boulder/pull/442
- https://github.com/letsencrypt/acme-spec/pull/156
2015-07-09 13:37:25 +00:00
Jakub Warmuz
5e450e879c
Save account private_key.json as 0o400.
2015-07-09 11:33:02 +00:00
Jakub Warmuz
7aa749174b
Fix achall response key chmods security bug.
2015-07-09 11:26:27 +00:00
Jakub Warmuz
0d24f52f6e
Expose le_util.safe_open.
2015-07-09 11:14:25 +00:00
Jakub Warmuz
3e2d1c8abc
get_cert_file -> get_cert_path.
2015-07-09 10:51:21 +00:00
Jakub Warmuz
1bc9e7cb64
Registration: drop singular email/phone
2015-07-09 06:53:06 +00:00
Jakub Warmuz
7dc64e0387
Rewrite acccounts and registration.
...
Save accounts to:
/etc/letsencrypt/accounts/www.letsencrypt-dmeo.org/acme/new-reg/ \
kuba.le.wtf@2015-07-04T14:04:10Z/ \
{regr.json,meta.json,private_key.json}
Account now represents a combination of private key, Registration
Resource and client account metadata. `Account.id` based on the
account metadata (creation host and datetime). UI interface
(`cli._determine_account`) based on the `id`, and not on email as
previously.
Add `AccountStorage` interface and `AccountFileStorage`,
`AccountMemoryStorage` implementations (latter, in-memory, useful for
testing).
Create Account only after Registration Resource is received
(`register()` returns `Account`).
Allow `client.Client(..., acme=acme, ...)`: API client might reuse
acme.client.Client as returned by `register()`.
Move report_new_account to letsencrypt.account, client.Client.register
into client.register.
Use Registration.from_data acme API.
achallenges.AChallenge.key is now the `acme.jose.JWK`, not
`le_util.Key`. Plugins have to export PEM/DER as necessary
(c.f. `letsencrypt.plugins.common.Dvsni.get_key_path`)
Add --agree-tos, save --agree-eula to "args.eula". Prompt for EULA as
soon as client is launched, add prompt for TOS.
Remove unnecessary letsencrypt.network. Remove, now irrelevant,
`IConfig.account_keys_dir`.
Based on the draft from
https://github.com/letsencrypt/letsencrypt/pull/362#issuecomment-97946817 .
2015-07-09 06:43:45 +00:00
Jakub Warmuz
0d087788da
Accept new_reg in acme.client.Client.register.
2015-07-08 19:23:12 +00:00
Jakub Warmuz
7470bc8db6
RegistrationResource: return any phone/email from phones/emails or None.
2015-07-08 19:23:06 +00:00
Jakub Warmuz
36eafde213
Use ComparableRSAKey autowrap throughout the code base.
2015-07-08 12:07:05 +00:00
Jakub Warmuz
a7817de4ab
Rewrite JWK.load, JWKRSA autowraps ComparableRSAKey.
2015-07-08 12:00:16 +00:00
Jakub Warmuz
0955012569
Move asn1_generalizedtime_to_dt todo comment to docstring.
2015-07-08 08:41:13 +00:00
Jakub Warmuz
90b27ff9cf
ComparableX509Test for cert and CSR
2015-07-07 17:00:08 +00:00
Jakub Warmuz
9ab40444b6
More Python data model fixes for acme.
2015-07-07 08:15:33 +00:00
Jakub Warmuz
20a08b50f2
ComparableX509 and ComparableX509Req: __eq__, __ne__, __hash__ data model fixes.
2015-07-07 08:05:41 +00:00
Jakub Warmuz
9a9f91b4ee
Fix typo
2015-07-07 07:21:48 +00:00
Jakub Warmuz
e05b10974c
test/acme_util.py: fix nonce lengths
2015-07-07 07:20:48 +00:00
Jakub Warmuz
e276f2aa6b
crypto imports cleanup
2015-07-06 12:18:31 +00:00
Jakub Warmuz
02e7154c0d
Drop M2Crypto
2015-07-06 12:18:27 +00:00
Jakub Warmuz
61aa29d28c
Drop PyCrypto.
2015-07-06 12:18:22 +00:00
Jakub Warmuz
9197fa6b5c
acme: M2Crypto -> pyOpenSSL
2015-07-06 12:18:17 +00:00
Jakub Warmuz
2c6ef0feef
Update hacking docs (venv/bin/activate, ./tox-cover.sh, integration, ipdb).
2015-07-06 09:19:00 +00:00
Jakub Warmuz
25f1e45d94
Remove acme.util docs
2015-07-06 07:55:29 +00:00
Jakub Warmuz
e0293d81f3
acme: drop PyCrypto and use cryptography instead.
...
- Use cryptography in acme.jose.jwa/jwk.
- Change Crypto.Random to os.urandom,
c.f. https://cryptography.io/en/latest/random-numbers/?highlight=urandom
2015-07-05 20:36:20 +00:00
Jakub Warmuz
7c3c52c2b1
Add example dev config file, config file docs.
2015-07-03 15:02:01 +00:00
Jakub Warmuz
c639673de5
Read config from $XDG_CONFIG_HOME/letsencrypt/cli.ini.
2015-07-03 14:38:09 +00:00
Jakub Warmuz
4407210e01
Fix --no-verify-ssl in HEAD, refactor acme.client_tests.
...
Fix #521 by introducing MissingNonceError, which by shows response
headers when printed to STDOUT. More sensible solution (a'la #523 ) is
blocked by boulder#417 (HTTP 405 response for HEAD).
Split out ClientNetworkWithMockedResponseTest from ClientNetworkTest,
which improves readability and makes it easier to test (less mocks).
2015-07-03 09:46:30 +00:00
Jakub Warmuz
2b32b94c0b
acme.client.ClientNetwork
2015-07-03 09:46:24 +00:00
Jakub Warmuz
dc9ffdbb7f
Update old TODO comment.
2015-07-02 04:51:41 +00:00
Jakub Warmuz
a7a863e1f2
Do not include /etc/nginx/mime.types in nginx integration testing.
...
This file (or /etc/nginx in whole) might not exist on the target
system.
2015-06-30 14:52:48 +00:00
Jakub Warmuz
2ec451d00b
IConfig.simple_http_port ( fixes #542 ).
2015-06-29 07:58:36 +00:00
Jakub Warmuz
29e56d442f
Fix line-too-long
2015-06-29 07:56:22 +00:00
Jakub Warmuz
87f197afb2
manual: make sure user doesn't serve /root, or cert.pem/key.pem
2015-06-29 07:56:22 +00:00
Jakub Warmuz
ce32de023d
Move simple_http_simple_verify to SimpleHTTPResponse.simple_verify.
2015-06-29 07:56:21 +00:00
Jakub Warmuz
36752a3dab
simpleHttp needs text/plain or absent.
2015-06-29 07:53:28 +00:00
Jakub Warmuz
a0acf7c703
acme.verify.simple_http_simple_verify
2015-06-29 07:50:31 +00:00
Jakub Warmuz
60478e213b
Bump apache coverage.
2015-06-28 09:42:43 +00:00
Jakub Warmuz
bfba30701e
Bump core coverage
2015-06-28 09:41:33 +00:00
Jakub Warmuz
051a351a43
Move test_add_chal from letsencrypt_nginx (plugins.common 100% coverage).
2015-06-28 09:39:21 +00:00
Jakub Warmuz
46707406b5
Tests: don't cover plugins.common test functions.
2015-06-28 09:38:03 +00:00
Jakub Warmuz
7abff038dc
Display tests: move test_visual to tests/display.py script.
2015-06-28 09:31:42 +00:00
Jakub Warmuz
cfbd33809e
Remove acme.util
2015-06-28 09:27:17 +00:00
Jakub Warmuz
4fbb5cb80f
Address review comments
2015-06-27 16:52:52 +00:00
Jakub Warmuz
096920b8b3
Refactor integration scripts, use --debug.
2015-06-27 13:34:23 +00:00
Jakub Warmuz
98844a196c
Add test for PluginError catching in disco
2015-06-27 10:02:02 +00:00
Jakub Warmuz
c96fc7e33a
travis_retry sudo apt-get ...
2015-06-27 09:43:33 +00:00
Jakub Warmuz
49b02e7740
Travis CI: test nginx plugin.
2015-06-27 09:20:37 +00:00
Jakub Warmuz
9652656e14
Integration tests for nginx plugin (without root).
2015-06-27 09:20:37 +00:00
Jakub Warmuz
c459102a04
letsencrypt_nginx: call "nginx -c server_root/nginx.conf ..."
2015-06-27 09:18:47 +00:00
Jakub Warmuz
30dfb6a1a9
letsencrypt_nginx: respect IConfig.dvsni_port (partially fixes #479 ).
2015-06-27 09:18:47 +00:00
Jakub Warmuz
be889d3794
letsencrypt_nginx: generate snakeoil cert/key ( fixes #481 ).
2015-06-27 09:18:37 +00:00
Jakub Warmuz
b7a19486ed
Plugins disco: catch PluginError in prepare(), debug log exceptions.
2015-06-27 08:14:00 +00:00
Jakub Warmuz
fd333d39bb
Merge remote-tracking branch 'github/letsencrypt/master' into 485-cleanup
...
Conflicts:
letsencrypt/cli.py
2015-06-27 07:01:58 +00:00
Jakub Warmuz
e3cd6fc709
Fix review comments.
2015-06-26 23:03:27 +00:00
Jakub Warmuz
79252e7940
Merge remote-tracking branch 'github/letsencrypt/master' into 485-cleanup
...
Conflicts:
tests/boulder-integration.sh
2015-06-26 21:11:42 +00:00
Jakub Warmuz
9d6cf6c6a2
Fix --help all to display options without topic.
2015-06-26 13:31:03 +00:00
Jakub Warmuz
abbd2483a5
install --key-path ( fixes #550 )
2015-06-26 13:26:09 +00:00
Jakub Warmuz
b1b3befd04
Backport #440 CLI changes, clean up after #485
...
Additonally:
- remove "-s", it will not be used often
- remove --accountkey (former --authkey), as it is not used
- CLI_DEFAULTS: cert_path -> auth_cert_path, chain_path -> auth_chain_path
- remove remaining "LetsEncrypt" error prefixes (fixes #487 ).
- HeplfulParser:
- call add_plugin_args from outside (this makes sure plugins are
displayed last in --help all)
2015-06-26 13:26:09 +00:00
Jakub Warmuz
c8dc9af7bf
Fix integration test for install.
2015-06-26 13:26:09 +00:00
Jakub Warmuz
7d775ae9f3
Add null installer, integration tests for install/run
...
Fixes #438 .
2015-06-26 13:26:09 +00:00
Jakub Warmuz
3383dedbcf
boulder-integration.sh: SERVER env variable
...
Blocks https://github.com/letsencrypt/boulder/pull/416
2015-06-26 07:20:01 +00:00
Jakub Warmuz
f080aae332
Merge remote-tracking branch 'github/letsencrypt/master' into logging
2015-06-25 21:11:46 +00:00
Jakub Warmuz
4ce4e2f930
logger = logging.getLogger(__name__)
2015-06-25 19:55:22 +00:00
Jakub Warmuz
865d9074e4
log.DialogHandler: print formatted record, not just message.
...
Fixes bug, where DialogHandler would display only %(message) part of
the record, instead of the entire formatted record string.
2015-06-25 19:55:22 +00:00
Jakub Warmuz
eb149b9129
CLI debug log file
2015-06-25 19:55:16 +00:00
Jakub Warmuz
5b9a2f9637
cli._setup_logging
2015-06-25 19:45:01 +00:00
Jakub Warmuz
6ba133fc7c
Debug log CLI arguments
2015-06-25 19:45:01 +00:00
Jakub Warmuz
60b6834ab0
Debug log registration errors.
2015-06-25 19:45:01 +00:00
Jakub Warmuz
3ade1d13f3
Merge remote-tracking branch 'github/letsencrypt/master' into renewer
...
Conflicts:
tests/boulder-integration.sh
2015-06-25 19:07:21 +00:00
Jakub Warmuz
f312bdac22
Fix unittests for dvsni_port.
2015-06-25 18:36:06 +00:00
Jakub Warmuz
3789922c0b
Move AugeasConfigurator to letsencrypt_apache.
...
https://github.com/letsencrypt/lets-encrypt-preview/pull/531#issuecomment-114285541
2015-06-25 17:55:49 +00:00
Jakub Warmuz
040f434a61
Renewer integration tests for standalone.
2015-06-25 17:43:17 +00:00
Jakub Warmuz
d543716adf
Merge remote-tracking branch 'github/letsencrypt/master' into renewer
2015-06-25 16:13:46 +00:00
Jakub Warmuz
d804853958
Remove commented suject fields in make_csr
2015-06-25 16:08:52 +00:00
Jakub Warmuz
4057734c33
Add integrations tests for CSR.
2015-06-25 16:05:25 +00:00
Jakub Warmuz
dc561ea3df
Merge remote-tracking branch 'github/letsencrypt/master' into csr
2015-06-25 15:26:41 +00:00
Jakub Warmuz
e51f300ee6
Merge remote-tracking branch 'github/letsencrypt/master' into csr
...
Conflicts:
letsencrypt/cli.py
letsencrypt/client.py
letsencrypt/tests/client_test.py
2015-06-25 13:36:41 +00:00
Jakub Warmuz
e0bc6aeb50
Travis CI setup for integration testing ( fixes #530 ).
...
Candidate issues to be addressed:
- race condition: start.sh might fail to start Boulder WFE before
./tests/boulder-integration.sh is run (unlikely, but possible,
leading to flaky tests)
- intertwined build logs (./start.sh boostraps in the background,
integration test debug logs on server and client side)
2015-06-25 09:50:23 +00:00
Jakub Warmuz
8bde250ff2
boulder-integration.sh: agree-tos -> agree-eula, force standalone.
2015-06-25 08:25:10 +00:00
Jakub Warmuz
434699031b
Merge remote-tracking branch 'github/letsencrypt/master' into integration-testing
2015-06-25 06:02:32 +00:00
Jakub Warmuz
77ddc68d8e
Quickfix for wrong renewer target paths.
...
IOError: [Errno 2] No such file or directory: '/tmp/le/config/archive/renewer/privkey2.pem'
2015-06-25 05:53:39 +00:00
Jakub Warmuz
38b497ef73
renewer: fix bug where renewer.conf wasn't read.
2015-06-25 05:36:02 +00:00
Jakub Warmuz
4de60f68ab
Pass cli_config to RenewableCert
2015-06-25 05:35:49 +00:00
Jakub Warmuz
b9f2823d6b
renewer: _paths_parser
2015-06-25 05:35:15 +00:00
Jakub Warmuz
15258cc50a
Update references after repo rename.
...
https://github.com/letsencrypt/letsencrypt/issues/505
2015-06-24 04:56:31 +00:00
Jakub Warmuz
457279adb2
Add errors.FailedChallenges and update AuthHandler to use it.
2015-06-23 20:10:20 +00:00
Jakub Warmuz
4fb1685b55
Update error codes, add "error" field to ChallengeBody (acme-spec#158).
2015-06-23 17:57:11 +00:00
Jakub Warmuz
e82f605c22
Merge branch '440-no-cli' into 473-no-cli
...
Conflicts:
letsencrypt/cli.py
letsencrypt/renewer.py
2015-06-23 08:17:07 +00:00
Jakub Warmuz
f1e747ac1a
Revert CLI changes, blocked by #485 .
2015-06-23 07:48:45 +00:00