Commit graph

529 commits

Author SHA1 Message Date
Jacob Hoffman-Andrews
a6cecd784b [#4535] - Unwrap 'max retries exceeded' errors (#4733)
Fixes #4535 

Extracts the relevant fields using a regex. We considered catching
specific exception types, and referencing their fields, but the types
raised by `requests` are not well documented and may not be long
term stable. If the regex fails to match, for instance due to a change
in the exception message, the new exception message will just be
passed through.
2017-10-19 14:16:59 -07:00
Brad Warren
13b4a4e1c2 Bump version to 0.20.0 2017-10-04 15:57:16 -07:00
Brad Warren
1f258449a4
Release 0.19.0 2017-10-04 12:11:20 -07:00
Seong-ho Cho
f6be07da74 fix #5111 AttributeError occured with >=pyOpenSSL-17.2.0 (#5112) 2017-09-15 16:57:10 -07:00
Brad Warren
6988491b67 Merge pull request #5080 from certbot/candidate-0.18.0
Release 0.18.0
2017-09-07 05:57:12 -07:00
Brad Warren
a7267b0fcd Bump version to 0.19.0 2017-09-05 16:07:03 -07:00
Brad Warren
756c44f7af
Release 0.18.0 2017-09-05 16:06:43 -07:00
Brad Warren
d710c441e2 Specify the minimum six version in acme 2017-09-05 10:07:32 -07:00
Bob Strecansky
a8e1df6e55 [#4535] - Unwrap max retries exceeded errors 2017-08-07 20:15:05 -04:00
Bob Strecansky
b3216727da [#4535] - Unwrap max retries exceeded errors 2017-08-07 19:34:20 -04:00
Bob Strecansky
8a78ef9675 [#4535] - Unwrap max retries exceeded errors 2017-08-07 15:33:01 -04:00
Bob Strecansky
2e7ec00e8c [#4535] - Unwrap max retries exceeded errors 2017-08-07 08:55:43 -04:00
Bob Strecansky
f7dedae388 [#4535] - Unwrap max retries exceeded errors 2017-08-07 08:39:39 -04:00
Bob Strecansky
9ae987d72b [#4535] - Unwrap max retries exceeded errors 2017-08-07 08:35:00 -04:00
Bob Strecansky
0c14d9372d Merge branch 'master' of github.com:certbot/certbot into max_retries_exceeded 2017-08-07 08:14:54 -04:00
Bob Strecansky
9b8c8f103e [#4535] - Unwrap max retries exceeded errors 2017-08-06 23:44:28 -04:00
Bob Strecansky
8555f4a0bd [#4535] - Unwrap max retries exceeded errors 2017-08-06 23:30:11 -04:00
Bob Strecansky
521f783020 [#4535] - Unwrap max retries exceeded errors 2017-08-06 23:02:07 -04:00
Bob Strecansky
5fb1568b6e [#4535] - Unwrap max retries exceeded errors 2017-08-06 22:26:17 -04:00
Bob Strecansky
57e664077f [#4535] - Unwrap max retries exceeded errors - fixing spacing 2017-08-06 10:51:10 -04:00
Bob Strecansky
880c35f3e3 [#4535] - Unwrap max retries exceeded errors 2017-08-05 10:39:04 -04:00
Bob Strecansky
3cc94798b6 [#4535] - Unwrap max retries exceeded errors 2017-08-05 10:26:01 -04:00
Bob Strecansky
959d72feb0 [#4535] - Unwrap max retries exceeded errors 2017-08-05 10:16:47 -04:00
Bob Strecansky
1e71ff5377 [#4535] - Unwrap max retries exceeded errors 2017-08-02 22:59:27 -04:00
Brad Warren
744c993040 Bump version to 0.18.0 2017-08-01 17:01:19 -07:00
Brad Warren
912d235466
Release 0.17.0 2017-08-01 17:01:07 -07:00
Bob Strecansky
18d3df78e8 [#4535] - Unwrap max retries exceeded errors 2017-07-26 20:37:13 -04:00
Jacob Hoffman-Andrews
b3004fe6cf Handle critical SAN extension. (#4931)
* Handle critical SAN extension.

* Add testdata/critical-san.pem.
2017-07-18 15:57:00 -07:00
yomna
bc3765d6d0 No longer mask failed challenge errors with encoding errors (#4867)
*     no longer masker failed challenge errors with encoding errors

* simplifying through type-checking

* bytes
2017-07-10 21:05:52 -05:00
ohemorange
57e56cc97b Candidate 0.16.0 (#4908)
* Release 0.16.0

* Bump version to 0.17.0
2017-07-06 15:57:11 -07:00
Brad Warren
5318945267 Hide exceptions that occur during session.close() (#4891)
* Hide exceptions that occur during session.close()

This fixes #4840. Exceptions that are raised out of __del__ methods are caught
and printed to stderr. By catching any exceptions that occur, we now prevent
this from happening.

Alternative solutions to this would have been either not calling
session.close() at all or adding a close() method to acme.client.ClientNetwork,
acme.client.Client, and certbot.client.Client and using certbot.client.Client
in a context manager to ensure close() is called. The former means that users
of the ACME library never properly close their connections until their program
exits and the latter adds a lot of complexity and nesting of client code for
little benefit.

* Only catch Exceptions
2017-07-05 09:25:44 -04:00
Brad Warren
f4094e4d3f Finish oldest tests (#4857)
* Pin oldest version of packaged python deps

* Install security extras in oldest tests

* Revert "bump requests requirement to >=2.10 (#4248)"

This reverts commit 402ad8b353.

* Use create=True when patching open on module
2017-06-23 09:40:59 -07:00
Brad Warren
0aab244846 Bump version to 0.16.0 2017-06-08 09:32:57 -07:00
Brad Warren
74acd1ee5a
Release 0.15.0 2017-06-08 09:32:41 -07:00
ohemorange
239184882e Enable IPv6 support in standalone plugin (#4773)
* add TLSSNI01DualNetworkedServers

* use DualNetworkedServers in certbot/plugins/standalone.py
  also, make both servers run on the same port.

* make probe_sni connect on ipv6 and ipv4 using None

* mimic BSD-like conditions to get test coverage

* test ServerManager taking into account BSD systems

* pass tests even if python is compiled without ipv6 support
2017-06-06 17:04:45 -07:00
Schuyler Duveen
7531c98916 fixes #3616: make sure there is always one time that we test the sock… (#4712) 2017-06-06 10:11:33 -07:00
Jacob Hoffman-Andrews
10bac107ee Add an account deactivate utility script. (#4254)
* Add an account deactivate utility script.

This is handy if you created an account with a tool other than Certbot, and want
to deactivate the account.

* Move deactivate.py to tools.

* Add test for ConflictError.

* Fix lint error.

* Document how to set server.
2017-05-17 14:24:59 -07:00
Jacob Hoffman-Andrews
686f5d6c81 Move 'jwk' and 'alg' fields to protected header. (#4677)
* Move 'jwk' and 'alg' fields to protected header.

Previously, these were in the unprotected JWS header, which Boulder currently
allows. However, the next version of the spec doesn't allow anything in the
unprotected header. Moving these fields now allows server implementers who are
implementing the Certbot/Boulder version of ACME
(https://github.com/letsencrypt/boulder/blob/master/docs/acme-divergences.md) to
use JOSE libraries that don't support unprotected headers.

Fixes #4417.

* Only protect existing headers.
2017-05-17 13:46:52 -07:00
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