1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00
Commit Graph

491 Commits

Author SHA1 Message Date
Brad Warren
2754a2d0ae Bump version to 0.15.0 2017-05-04 16:52:29 -07:00
Brad Warren
4be7efbf74 Release 0.14.0 2017-05-04 16:52:13 -07:00
Brad Warren
5ca8f7c5b9 Add lockfile (#4449)
* add lock_file

* cleanup lock file

* Add LockFile tests

* add lock_dir

* add lock_dir_until_exit

* add set_up_core_dir and move lock_dir_until_exit

* Move lock_and_call to certbot.test.util

* Add lock to Apache

* Add lock to the Nginx plugin

* Improve permissions error message

* sort plugins

* add test_prepare_order

* provide more actionable permissions error

* Document and catch use of OSError

* don't lock a directory twice

* add conditional dependency on ordereddict

* Add lock_test

* expand sorted plugins comment

* Add lock_test to lint

* make make_lineage more conventional and flexible

* enhance lock_test.py

* add lock_test to tox

* Readd success message

* make py26 happy

* add test_acquire_without_deletion
2017-05-01 14:49:12 -07:00
Brad Warren
8fa12bef8e Tell the world we're Python 3 compatible (#4568)
* Mention python 3 support in setup.py

* Build universal (py2 and py3 compatible) wheels

* Mention Python 3.3+ support in docs

* we work on python 3.6 too
2017-04-28 16:06:45 -07:00
Brad Warren
89af460792 Reuse dynamic install_requires. (#4554)
* Revert "Make argparse dependency unconditional. (#2249)"

  This reverts commit 8f10103496.

* Update comment about environment markers
2017-04-28 15:03:50 -07:00
Jacob Hoffman-Andrews
b3116af5b4 Add url and kid to jws. (#4340)
* Add url and kid to jws.

This will be required in order to implement the latest ACME spec, which uses
these protected header fields.

* Add comments and fix lint.

* Enforce mutual exclusivity of jwk and kid.
2017-04-21 18:49:57 -07:00
Jacob Hoffman-Andrews
d557c39c99 Remove obsolete fields from Registration. (#4339)
Authorizations and certificates were in the original spec but have since been
deleted.
2017-04-07 09:52:12 -07:00
Ngo The Trung
315b6d0cf1 Fix unorderable types error (#4409)
If the updated datetime collides, the comparator of heapq will move
onto the AuthorizationResource value and throws an "unorderable type"
error.

This adds an index value to the element tuple to ensure that they are
always strictly ordered.
2017-04-07 09:46:27 -07:00
Jacob Hoffman-Andrews
cacee80c51 Move make_csr into acme.crypto_util (#4165)
It's relatively finicky to make a CSR appropriate to pass to poll_and_request_issuance. I think most users want to be able to give a list of domains and a private key, and get back a CSR. This branch adds that functionality to crypto_util.

Note that the two new functions take arguments, and return values, as PEM-encoded buffers. This is a departure from some existing ACME interfaces that take PyOpenSSL types. I've discussed with the Certbot team, and we agree that this is broadly the direction the ACME API should take, so that users of the module don't need to import PyOpenSSL themselves, or use its primitives.

* Add make_csr.

* accept privkey

* Tweak API.

* Remove make_csr from certbot package.

* Skip test in older Pythons.

* Move get_Extensions call under protection.

* Remove assertIn because not backwards-compatible.

* Fix encoding, and use PEM.

* Fix test

* Fix tests on py35.

* Fix error in test.

* Make import_csr_file always return PEM.

Also delete get_sans_from_csr (unused) and get_names_from_csr (newly unused).

* Fix function doc.

* Fix indent

* Fix call of obtain_certificate_from_Csr

* lint

* Handle review feedback.

* Fix test.
2017-04-07 09:43:33 -07:00
Erica Portnoy
82f3f7523e Candidate 0.13.0 (#4475)
* Release 0.13.0

* Bump version to 0.14.0
2017-04-06 11:33:32 -07:00
Damien Tournoud
5c93ceb675 acme: Make the network timeout configurable (#4237)
This follows up on https://github.com/certbot/certbot/pull/4217, but allows users to override the default setting.
2017-03-27 09:24:05 -07:00
dokazaki
8011fb2879 Add mypy (#4386)
* Initial configuration of mypy in box, correction of base mypy errors.

* Move mypy install to toe

* Add pylint comments for typing imports.

* Remove typing module for Python 2.6 compatibility.
2017-03-18 19:10:10 -07:00
Jacob Hoffman-Andrews
018a304cd6 Remove Link rel=next for authzs and new-certs. (#4303)
An early version of the spec indicated that clients should process issuance
sequentially, following Link rel=next from an account URL to an authz URL, to a
new-cert URL. However, the spec has long since moved to putting these URLs in
the directory.

Certbot nominally supports either; This change consolidates on always using the
directory, simplifying things and making the transition to the latest ACME spec
easier.

* Revert "Revert "Remove Link rel=next for authzs and new-certs." (#4277)"

This reverts commit 11ec1eb911.

* Save new_authzr_uri with account for older clients.

* Add test that new_authzr_uri exists in regr.

* Restore backwards compatibility for new_authzr_uri.

* Fix account_test.

* Add test for deprecated URI argument to request_challenges.

* Review feedback.

* Fix test

* Add omitempty to new_cert_uri.
2017-03-14 21:44:57 -07:00
Brad Warren
662c323b55 Build wheels correctly for Python 2.6 (#4313)
* stop conditionally pinning mock version in acme

* stop conditionally pinning mock version in certbot

* stop conditionally pinning mock version in apache

* stop conditionally pinning mock version in nginx

* stop conditionally pinning mock version in letshelp

* stop conditionally pinning mock version in compatibility-test
2017-03-10 10:58:03 -08:00
Erik Rose
8f10103496 Make argparse dependency unconditional. (#2249)
The primary motivation is to avoid a branch, giving bugs one fewer place to hide. But, as a bonus, more people get a more bugfixed version of argparse. (To use the example from the argparse docs, people stuck on Python 3.2.3 can get bugfixes that made it into the stdlib only in 3.2.4.)
2017-03-08 17:10:12 -08:00
Blake Griffith
12a6e49cf1 Remove use of sha1 (#4271)
These are not security critical uses of sha1 but they should still be removed.
2017-03-02 21:16:19 -08:00
Jacob Hoffman-Andrews
53117b0ce0 Remove UnexpectedUpdate exceptions. (#4197)
* Remove UnexpectedUpdate exceptions.

These exceptions trigger when the server sends the client back an object with a
field that doesn't exactly match what the client previously sent.

This causes unnecessary breakage in various cases, doesn't prevent any problems,
and isn't required by spec.

* Back out all UnexpectedUpdate removals except registration update.
2017-03-02 17:27:29 -08:00
Erica Portnoy
5e671682ca Candidate 0.12.0 (#4286)
* Release 0.12.0

* Bump version to 0.13.0
2017-03-02 15:26:24 -08:00
Brad Warren
11ec1eb911 Revert "Remove Link rel=next for authzs and new-certs." (#4277) 2017-03-02 10:31:15 -08:00
Damien Tournoud
44a6ec29c5 Fix direct usages of the root logger (#4236)
Some code uses `logging.debug` and `logging.info` instead of
the file-specific logger in `logger.debug` and `logger.info`.
2017-02-27 18:13:06 -08:00
Brad Warren
402ad8b353 bump requests requirement to >=2.10 (#4248) 2017-02-27 17:17:08 -08:00
Jacob Hoffman-Andrews
a92ca8e97c Add default timeout to ClientNetwork. (#4217)
In https://community.letsencrypt.org/t/letsencrypt-cli-hangs-on-certificate-request/27211,
a community member pointed out that Certbot seems to hang when there are
routing problems.
2017-02-22 18:48:01 -08:00
Jacob Hoffman-Andrews
1380e59f56 Remove Link rel=next for authzs and new-certs. (#4194)
An early version of the spec indicated that clients should process issuance
sequentially, following Link rel=next from an account URL to an authz URL, to a
new-cert URL. However, the spec has long since moved to putting these URLs in
the directory.

Certbot nominally supports either; This change consolidates on always using the
directory, simplifying things and making the transition to the latest ACME spec
easier.
2017-02-13 19:50:33 -08:00
Brad Warren
a6b51f1edd Bump version to 0.12.0 2017-02-01 09:50:57 -08:00
Brad Warren
30bc68ccde Release 0.11.0 2017-02-01 09:50:42 -08:00
Brad Warren
be5bcfe463 Remove optional dependencies (#4088)
* Stop using already_listening in standalone

* remove already_listening

* remove psutil entirely

* fix #595

* Add basic perform test

* make pep8 happy

* Add test_perform_eacces

* add _setup_perform_error

* Add test_perform_unexpected_socket_error

* add test_perform_eaddrinuse_no_retry

* add test_perform_eaddrinuse_retry

* cleanup tests

* stop using dnspython

* don't install dns extras in tox

* remove dns extras from setup.py

* Add simple_verify back to DNS response

* remove dnspython from oldest tests
2017-01-30 16:55:54 -08:00
Brad Warren
240438eec7 Incorporate feedback from 4113 (#4115) 2017-01-30 09:44:55 -08:00
Josh Soref
6a39a42f45 Spelling (#4101)
* spelling: action

* spelling: artifacts

* spelling: asymmetric

* spelling: attempts

* spelling: bizarre

* spelling: certbot

* spelling: certificate

* spelling: certainly

* spelling: challenge

* spelling: client

* spelling: collated

* spelling: correct

* spelling: considered

* spelling: custom

* spelling: distinguish

* spelling: encoding

* spelling: enhancement

* spelling: equivalent

* spelling: execution

* spelling: existence

* spelling: failed

* spelling: handshake

* spelling: hyphen

* spelling: initialized

* spelling: initialization

* spelling: interpretation

* spelling: letsencrypt

* spelling: multiline

* spelling: multipart

* spelling: necessary

* spelling: otherwise

* spelling: output

* spelling: overridden

* spelling: positives

* spelling: preferable

* spelling: progress

* spelling: recommended

* spelling: referring

* spelling: relativity

* spelling: request

* spelling: requiring

* spelling: separate

* spelling: source

* spelling: specified

* spelling: standard

* spelling: successfully

* spelling: unparseable

* spelling: useful
2017-01-26 16:21:54 -08:00
Brad Warren
c650c9a709 add test_post_successful_retry 2017-01-25 15:10:24 -08:00
Brad Warren
46d9809fa1 add test_post_failed_retry 2017-01-25 15:08:01 -08:00
Brad Warren
a5da551965 fix stylistic nits with POST retry 2017-01-25 14:10:19 -08:00
Frederic BLANC
b6fecca7ba fixes #2244 2017-01-25 13:38:00 -08:00
Brad Warren
bb669528b3 Remove old references to pep8 in our code (#4073) 2017-01-19 11:21:25 -08:00
Blake Griffith
49d46ef99a Impelment account deactivation [revision requested] (#3571)
Impelment account deactivation
2017-01-17 16:00:07 -08:00
Peter Eckersley
796220f6f1 Adopt consistent linting practices for the entire tree (#3843)
* Use the certbot pylintrc for the ACME module

* Further parallelise lint, and don't run PEP8 checks
2017-01-17 12:53:13 -08:00
Craig Smith
94c23479e2 Add option to specify revocation reason (#3242) (#3988)
This includes two new tests in the integration test script to check that
boulder gets the correct code. The encoding is specified in RFC5280
5.3.1. The codes that boulder will accept are a subset of that,
specified in `boulder.revocation.reasons.go`.
2017-01-11 18:26:55 -08:00
Brad Warren
364a6d8a2d Release 0.10.0 (#4022)
* Release 0.10.0

* Bump version to 0.11.0
2017-01-11 12:01:33 -08:00
Ondřej Surý
379807bf0d Add workaround for platforms where injecting pyopenssl to urllib3 (#3990)
fails with requests package (Ubuntu Trusty)
2017-01-10 11:39:40 -08:00
Peter Eckersley
59c602d9ca Parallalelise nosetests from tox (#3836)
* Parallalelise nosetests from tox

* Parallelise even more things, break even more things

* Now unbreak all the tests that aren't ready for ||ism

* Try to pass tests!

 - Remove non-working hack in reporter_test
 - also be selective about ||ism in the cover environment

* Try again

* certbot-apache tests also work, given enough time

* Nginx may need more time in Travis's cloud

* Unbreak reporter_test under ||ism

* More timeout

* Working again?

* This goes way faster

* Another big win

* Split a couple more large test suites

* A last improvement

* More ||ism!

* ||ise lint too

* Allow nosetests to figure out how many cores to use

* simplify merge

* Mark the new CLI tests as ||izable

* Simplify reporter_test changes

* Rationalise ||ism flags

* Re-up coverage

* Clean up reporter tests

* Stop modifying testdata during tests

* remove unused os
2016-12-06 20:39:16 -08:00
Peter Eckersley
8b67a58f3c Ensure tests pass with openssl 1.1 (#3827)
* Ensure tests pass with openssl 1.1

A bunch of the acme.standalone and acme.crypto_util tests were using
weak crypto that is now prohibited :/

* lint

* lintlint

* Fix symlink
2016-12-02 15:11:35 -08:00
Brad Warren
edbb3a73c6 Take advantage of urllib3 pyopenssl rewrite (#3805)
* pin requests version in py26-oldest

* Determine requests security deps dynamically

Starting with requests 2.12, pyasn1 and ndg-httpsclient are no longer
needed to inject pyopenssl into urllib3. This change allows us to
determine whether or not these dependencies are required at install
time. If an older version of requests is used, these packages are
still installed. If a new version of requests is used, they are not
reducing the number of dependencies we have.

* Bump requests version in certbot-auto

* Use pkg_resources in activate test

Due to pip's lack of dependency resolution, the change to use
requests[extras] causes errors in acme.util_test because pkg_resources
accurately detects the "missing" dependency.

There isn't a real problem here. The problem comes from a brand new
requests and ancient pyopenssl as well as a unit test for
functionality we plan to remove in our next release. I modified
the unit test to fix the problem for now.

* Use six instead of pkg_resources for test

* Require requests<=2.11.1 in py27-oldest test

If we don't do this, we get test failures for the certbot package
which is actually a good thing! pkg_resources is catching the
unlikely but possible problem I describe in #3803 and erroring out
saying it is missing the necessary dependencies to run certbot.
Good job package resources.

* Undo changes to acme.util_test
2016-12-01 10:47:08 -08:00
Peter Eckersley
0956e61c7c Remove the sphinxcontrib.programout [docs]dependency (#3830)
- By making a static text file at release time, and including that
   instead.
2016-11-30 10:47:10 -08:00
Jacob Hoffman-Andrews
88076e46c7 Improve debug logs. (#3126)
Print request and response bodies with newlines, rather than all on one line.
Remove "Omitted empty field" log, which gets logged meaninglessly for every JSON
serialization.
Remove duplicated logging of responses.
Log the base64 version of the nonce, rather than turning it into bytes and
logging the backslash-escaped version of those bytes.
Only pass -vv in tests.
2016-10-26 18:07:33 -07:00
Blake Griffith
7773568332 Update ACME error namespace to match the new draft. (#3469)
* Update error namespace in acme package.

* Use new error namespace in certbot.

* fix lint and py26 errors.

* Update with_code docstring.

* @pde's suggestions
2016-10-12 14:46:02 -07:00
Brad Warren
f5bf66ba36 Check version requirements on optional dependencies (#3618)
* Add and test activate function to acme.

This function can be used to check if our optional dependencies are
available and they meet our version requirements.

* use activate in dns_resolver

* use activate in dns_available() in challenges_test

* Use activate in dns_resolver_test

* Use activate in certbot.plugins.util_test

* Use acme.util.activate for psutil

* Better testing and handling of missing deps

* Factored out *_available() code into a common function

* Delayed exception caused from using acme.dns_resolver without
  dnspython until the function is called. This makes both
  production and testing code simpler.

* Make a common subclass for already_listening tests

* Simplify mocking of USE_PSUTIL in tests
2016-10-11 17:50:11 -07:00
Blake Griffith
dcb3fb7382 Use correct Content-Types in headers. (#3566)
* Add Content-Type: app/jose+json to post requests.

* Add tests for proper content type.
2016-10-05 12:28:38 -07:00
Brad Warren
76a92d4cde Release Certbot 0.9.0 (#3583)
* Release 0.9.0

* Bump version to 0.10.0
2016-10-05 10:13:28 -07:00
Brad Warren
da22e64563 Allow tests to pass without dnspython (#3581)
* move skipUnless to test_util

* add skip_unless to acme test_util

* Make dns_resolver_tests work with and without dnspython

* make acme.challenges_test pass when dns is unavailable
2016-10-04 16:49:51 -07:00
Peter Eckersley
1584ee8ac6 Merge pull request #3466 from certbot/all-together-now
DNS challenge support in the manual plugin and general purpose --preferred-challenges flag
2016-09-22 14:15:25 -07:00
Brad Warren
7b7477ab94 Merge branch 'prettify' into all-together-now 2016-08-29 15:20:00 -07:00