Commit graph

8119 commits

Author SHA1 Message Date
Eccenux
20bca19420 Show a diff when re-creating certificate instead of full list of domains #5274 2017-11-30 20:24:49 +01:00
Brad Warren
d246ba78c7
Use pip3 if pip isn't available (#5277) 2017-11-29 13:09:25 -08:00
Jacob Hoffman-Andrews
8fd1d0d19e Small Travis cleanups (#5273)
* Test with no hosts.

* Simplify build matrix.

* Remove after_failure.
2017-11-28 18:22:01 -08:00
Noah Swartz
f5ed771d4f change some instances of help to flag (#5248) 2017-11-27 14:50:06 -08:00
Peter Eckersley
cdd89998e3 Add nginx to these weird instructions (#5243)
These are probably made obsolete by the instruction generator, and they don't include Ubuntu...
2017-11-27 14:49:19 -08:00
jonasbn
e795a79547 Lots of minor small cosmetic changes and addressing the feedback on uniformity (in the file) from @SwartzCr 2017-11-15 07:38:09 +01:00
jonasbn
02126c0961 Minor improvement to newly added documentation section 2017-11-15 07:24:54 +01:00
jonasbn
0b843bb851 Added some missing documentation 2017-11-15 07:23:34 +01:00
jonasbn
4d60f32865 Minor corrections to return types for improved formatting 2017-11-12 13:03:09 +01:00
jonasbn
069ce1c55f Merge branch 'master' of https://github.com/certbot/certbot 2017-11-12 00:32:45 +01:00
jonasbn
eb26e0aacf Updated parameter types for a lot of parametersm some aspects are still a bug unclear, hopefully a review can shed some light on this details 2017-11-12 00:32:24 +01:00
Brad Warren
686fa36b3b Install dnsmadeeasy extras from dns-lexicon (#5230)
* Add tools/pip_constraints.txt to pin all Python dependencies

* Use tools/pip_constraints.txt in tools/pip_install.sh

* Install dnsmadeeasy extras in dnsmadeeasy plugin
2017-11-08 10:58:00 -08:00
jonasbn
1173acfaf0 Making friends with the linter
lint: commands succeeded
congratulations :)
2017-11-07 22:18:11 +01:00
jonasbn
0aa9322280 Added a shot at what might be the proper type, I need to get a better understanding of certbot's datatypes 2017-11-07 21:47:59 +01:00
jonasbn
89485f7463 I think I figured out the authentication handler object 2017-11-07 21:40:35 +01:00
jonasbn
4e73d7ce00 Specified the list parameters after reading up on lists as parameters
Ref: https://stackoverflow.com/questions/3961007/passing-an-array-list-into-python
2017-11-07 21:24:30 +01:00
jonasbn
0137055c24 First shot at updates at documentation, plenty of questions left at issue #4736 2017-11-05 21:59:55 +01:00
Brad Warren
884fc56a3e
Use pipstrap to ensure pip works on older systems (#5216)
* Use pipstrap in tools/_venv_common.sh

* Use _venv_common.sh in test_sdists
2017-11-03 10:59:56 -07:00
Joona Hoikkala
68e37b03c8 Nginx IPv6 support (#5178)
* Nginx IPv6 support

* Test and lint fixes

* IPv6 tests to Nginx plugin

* Make ipv6_info() port aware

* Named tuple values for readability

* Lint fix

* Requested changes
2017-10-31 19:41:32 -05:00
yomna
2a13f00301
Merge pull request #5205 from mvi-x/master
[#5155] - replaces isinstance(x, str) with isinstance(x, six.string_types)
2017-10-31 14:42:14 -07:00
yomna
f962b5c83d Forcing pip to use https on older docker images (#5214) 2017-10-31 12:52:40 -07:00
mvi
19a4e6079e [#5155] - replaces instances of isinstance(x, str) with isinstance(x, six.string_types) 2017-10-26 19:13:25 +02:00
ohemorange
e2ab940ac0 Fix bug that stopped nginx from finding new server block for redirect (#5198)
* fix bug that stopped nginx from finding new server block for redirect

* add regression test
2017-10-20 16:46:36 -07:00
ohemorange
3c1dafa9e9 Correctly test for existing Certbot redirect when adding an Nginx redirect block (#5192)
* add test that should fail on completion of this PR

* fix double redirect problem

* update existing test to match new whitespace
2017-10-19 14:56:53 -07:00
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
Felix Yan
5d2f6eb8ed Fix typos in certbot_apache/tests/configurator_test.py (#5193) 2017-10-19 11:23:07 -07:00
ohemorange
95a7d45856 Nginx creates a vhost block if no matching block is found (#5153)
* Allow authentication if there's no appropriate vhost

* Update test

* add flag to suppress raising error if no match is found

* Allow installation if there's no appropriate vhost

* remove traceback

* make new vhost ssl

* Fix existing bugs in nginxparser.py and obj.py

* Switch isinstance(x, str) to isinstance(x, six.string_types) in the Nginx plugin

* remove unused import

* remove unneeded custom copy from Addr

* Add docstring for create_new_vhost_from_default

* add test for create_new_vhost_from_default

* add configurator tests and leave finding the first server block for another PR

* don't assume order from a set

* address multiple default_server problem

* don't add vhosts twice

* update unit tests

* update docstring

* Add logger.info message for using default address in tlssni01 auth
2017-10-13 12:29:02 -07:00
Joona Hoikkala
99f00d21c4 Skip menu in webroot plugin when there's nothing to choose from (#5183)
* Skip menu in webroot, when there's nothing to choose from

* Added testcase
2017-10-13 12:25:33 -07:00
Brad Warren
7c11158810 Retry failures to start boulder (#5176)
Occasionally a network error prevents Docker from starting boulder causing
Travis tests to fail like it did at
https://travis-ci.org/certbot/certbot/jobs/282923098. This works around the
problem by using travis_retry to try to start boulder again if it fails.

This also moves the logic of waiting for boulder to start into
tests/boulder-fetch.sh so people running integration tests locally can benefit.
2017-10-12 17:00:13 -07:00
Joona Hoikkala
232f5a92d1 Fix naming in error message (#5181) 2017-10-11 08:18:41 -07:00
Brad Warren
1081a2501f integration test to prevent regressions of #5115 (#5172) 2017-10-11 08:18:17 -07:00
Brad Warren
03cbe9dd86 Document --no-directory-hooks (#5171) 2017-10-11 08:16:48 -07:00
Brad Warren
cacc40817b Update brew before installing packages (#5182)
* Update brew
2017-10-10 17:30:51 -07:00
r5d
d2c16fcb62 certbot: Flush output after write in IDisplay methods. (#5164)
- Update `notification`, `yesno`, `checklist`, `_print_menu`, and
  `_get_valid_int_ans` methods in `certbot.display.util.FileDisplay`.
- Update `notification` method in
  `certbot.display.util.NoninteractiveDisplay`.

Addresses issue #4879.
2017-10-04 18:06:57 -07:00
Brad Warren
a8051b58eb Update changelog to reflect 0.19.0. (#5170) 2017-10-04 17:58:10 -07:00
Brad Warren
2d4f36cc9f Merge pull request #5169 from certbot/candidate-0.19.0
Release 0.19.0
2017-10-04 16:58:07 -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
yomna
3087b436f3 Delete after revoke [#4109] (#4914)
*     Switching from old branch (issue-4109) and addressing changes requested
    in last iteration of review:
    80aa857fd2

    Requested changes that were addressed:
    - fixed outdated docstring for `cert_path_to_lineage`
    - removed `full_archive_dir_from_renewal_conf` amd replaced with `full_archive_path` (and `_full_archive_path` -> `full_archive_path`)
    - matching on `cert` instead of `chain` in `cert_manager.cert_path_to_lineage`
    - fixed the two coding wrongs make a right issue

    Requested changes which were not addressed:
    - moving `cert_path_to_lineage` from `cert_manager` to `storage`,
      as it would introduce a hard to resolve circular dependency.

* Update integration tests to handle default deletion after revoke.

* Swapping test domains.

* Addressing PR feedback:
	- calling storage.full_archive_path with a ConfigObj instead of None
	- Removing lambda x: x.chain_path as an option to match against

* Addressing PR feedback: it's expected that len(pattern) is 0, so handle that case properly.

* Testing of conflicting values of --cert-name and --cert-path non-interactive mode.

* Silly test for when neither certname nor cert-path were specified.

* Changing archive_files to a private function, because mocking nested functions seems impossible.

* Tests for storage.cert_path_for_cert_name

* Splitting out _acceptable_matches

* Some tests for cert_manager.cert_path_to_lineage

* Offerings to the Lint God

* Cleaner way of dealing with files in archive dirs

* Handling the two different use cases of match_and_check_overlaps a bit better

* late night syntax errors

* Test for when multiple lineages share an archive dir

* Tests for certbot.cert_manager.match_and_check_overlaps

* Removing unneeded nesting

* Lint errors that Travis caught that didn't show up locally

* Adding two integration tests (matching & mismatched --cert-path, --cert-name)  based on feedback.

* Asking the user if they want to delete in interactive mode.
2017-10-03 16:36:26 -07:00
Brad Warren
356471cdf6 Add hook directories (#5151)
* Add hook dir constants

* Add hook dir properties to configuration

* test hook dir properties

* reuse certbot.util.is_exe

* Add certbot.hooks.list_hooks

* test list_hooks

* Run pre-hooks in directory

* Run deploy-hooks in directory

* Run post-hooks in directory

* Refactor and update certbot/tests/hook_test.py

* Add integration tests for hook directories

* Have Certbot create hook directories.

* document renewal hook directories

* Add --no-directory-hooks

* Make minor note about locale independent sorting
2017-10-03 13:52:02 -07:00
r5d
b9d129bd43 certbot: Stop using print in log module. (#5160)
* Update certbot.log.post_arg_parse_except_hook function.
* Update certbot.tests.log_test._test_common method.

See discussion #3720.
2017-10-03 12:52:41 -07:00
Giacomo Ghidini
b0e5809df2 [#5154] Enable certificate verification (incl. revocation) on Docker (#5159)
o Install `openssl` as part of `.certbot-deps`
o `certbot` on Docker container uses `openssl` to verify certificate
2017-10-02 18:34:59 -07:00
Joona Hoikkala
46052f826c Handle NoneType from Augeas better in Apache parser get_arg (#5135)
* Fix #4245

* Simpler, more accurate test

* Do not add empty values to parser modules

* Py26 fix
2017-10-02 16:18:37 -07:00
Brad Warren
5f6b1378ec Fixes #5115 (#5150) 2017-10-02 14:33:49 -07:00
Brad Warren
34d78ff626 Fix hook test. (#5152)
Up until now, this test was written incorrectly. In addition, when it has
failed, it simply prints error messages rather than reporting that the test
failed. This fixes both of these problems.
2017-10-02 13:20:35 -07:00
Brad Warren
cad7d4c8ed Update master to reflect 0.18.2 (#5127)
* Release 0.18.2

(cherry picked from commit d031c42b98)

* Bump version to 0.19.0
2017-09-27 16:02:40 -07:00
Joona Hoikkala
ba84b7ab49 Add test to prevent regressions of #4183 (#5134) 2017-09-27 15:51:28 -07:00
ohemorange
7412099567 Allow multiple interactive certname selections in certbot delete (#5133) 2017-09-27 15:47:40 -07:00
r5d
85deca588f Stop using print in certbot.main module. (#5121)
* Stop using print in `certbot.main` module.

* Update certbot.main.plugins_cmd` function.

* Update test methods `test_plugins_no_args`,
`test_plugins_no_args_unprivileged`, `test_plugins_init` and
`test_plugins_prepare` in `cerbot.tests.MainTest` class.

Addresses #3720.

* certbot: Add `patch_get_utility_with_stdout` function.

* Add functions `certbot.tests.util.patch_get_utility_with_stdout`
  and `certbot.tests.util._create_get_utility_mock_with_stdout`.

* certbot: tests: Update tests in MainTest.

* Update methods `test_plugins_no_args`,
`test_plugins_no_args_unprivileged`, and `test_plugins_init`,
`test_plugins_prepare` to use `patch_get_utility_with_stdout`.

* certbot: tests: Update _create_get_utility_mock_with_stdout.

* Update certbot.tests.util._create_get_utility_mock_with_stdout
  function. The mock function for all IDisplay methods, except
  `notification` method, calls _write_msg and _assert_valid_call.

* certbot: tests: Update `patch_get_utility_with_stdout`

* Update doc string.
* Argument stdout's default value is None now.

* certbot: tests: Update util._create_get_utility_mock_with_stdout.
2017-09-25 18:42:31 -07:00
Brad Warren
8b7d6c4ea3 Update changelog for 0.18.2 (#5128) 2017-09-25 16:46:04 -07:00