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

158 Commits

Author SHA1 Message Date
Chris Julian
2bfc92e58d #4071 Mixin to prevent setting return_value after initializing certain Mock objects (#4963)
* Addressing #4071 Wrote an ImmutableReturnMixin to prevent developers overriding return_value in certain Mock objects

* Language

* Loosening the assumption that underlying _mock objects need to be Immutable-like simplifies implementation

* Addressing #4071

* Ensure side_effects and return_values are pushed down to the underlying _mock in FreezableMocks. And IDisplay mocks are no longer frozen in _create_get_utility_mock()

* Edit a handful of tests to not override the mock_get_utility return_value

* Brief explainer of FreezableMock.__setattr__

* Incorporating PR feedback and some compatibility

* FreezableMock __getattr__ needs a shortcut in case of return_value or side_effect

* Changing return_value only forbidden if set before freezing

* Remove unnecessary else block

* Expanded doc strings

* Bring a couple new tests in line with patch_get_utility() norms
2017-08-30 09:52:45 -07:00
Brad Warren
ae0be73b53 Make common Installer base class (#5055)
* Add installer class

* Add wrapped reverter methods to common.Installer.

* Use Installer class in Apache plugin

* Use Installer class in Nginx plugin

* Don't create reverter in Apache and Nginx plugins
2017-08-28 17:06:09 -07: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
Noah Swartz
7d5ccd006b Merge pull request #4904 from certbot/improve-apache-error-message2
Update Apache error message and comment
2017-07-20 11:02:08 -07:00
Noah Swartz
7efa213b22 Merge pull request #4814 from certbot/improve-apache-error-message
Correct message about vhost ambiguity
2017-07-12 07:53:36 -07: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
72b1a6f9cd Update outdated comment 2017-07-05 10:03:02 -04:00
Brad Warren
bf763cbbc6 remove outdated error message 2017-07-05 10:00:14 -04:00
Zach Shepherd
f51d345d5b Low-impact cleanup of IDisplay (#4818)
Remove unused help-related display code. When NcursesDisplay was
removed[1], help was deprecated. This change removes the remaining
bits and pieces of code.

Remove unused escape-related display code. When NcursesDisplay was
removed[1], escape was deprecated. This change removes the remaining
bits and pieces of code.

Remove uses of unused menu parameters.

Remove unused default_status/default_state argument from checklist.
(This seems safe because not only is it unused, the parameter has
different names in the interface and implementation)

1 - d54cb76432

Resolves #4795.
2017-06-15 17:14:38 -07:00
Brad Warren
d3549e18a7 Correct message about vhost ambiguity.
When our Apache plugin is unable to determine which virtual host to use in
non-interactive mode, it raises an error about vhost ambiguity with
instructions on how to fix the problem. These instructions stated that we
require one vhost per file which is no longer accurate since #4706 so I removed
this part of the error message.
2017-06-09 12:48:59 -07:00
Yen Chi Hsuan
ba3b14d4da Add Arch Linux constants for Apache (#4466) 2017-06-08 12:08:47 -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
Brad Warren
844c2d3438 Finish work on #4718.
* Update in response to changes in #4720.

* Update ALL_SSL_OPTIONS_HASHES.

* Add warning to Apache's SSL options files.
2017-06-01 14:35:03 -07:00
Erica Portnoy
44f4743b51 Mechanism for automatically updating options-ssl-apache.conf file
* add file update mechanism + tests to apache

* update with actual hashes, and update apache test to match since there aren't previous versions
2017-06-01 14:35:03 -07:00
ohemorange
fc097de5ff Refactor nginx file update mechanism in preparation for working with apache plugin (#4720)
* move install_ssl_options_conf functionality to common

* add no cover

* compute current hash instead of saving

* make current hash be computed; switch to list of all canonical hashes

* put message directly into assertion

* don't pass logger

* add docstring

* Add unit tests for certbot.plugins.common.install_ssl_options_conf
2017-06-01 09:04:48 -07:00
Joona Hoikkala
f5b61d56bd Force augeas file reload to recalculate span indicies 2017-05-15 12:56:45 -07:00
Brad Warren
65f7f3e12b Modify special action types only once 2017-05-15 12:22:47 -07:00
Brad Warren
be7e99a461 Pin dependency versions when using tools/venv.sh (#4629)
* Revert "Pin python-augeas version to avoid error with 1.0.0 (#4422)"

This reverts commit 1c51ae2588.

* make dependency-requirements

* separate certbot and dependency requirements

* fix build.py

* update hashin comment

* simplify release pinning

* separate letsencrypt dependency

* pin hashes in venv

* error out when bad things happen

* use pinned dependencies in tox

* Revert "pin hashes in venv"

This reverts commit 1cd38a9e50.

* use pip_install.sh in venv_common

* quote pip install args

* bump mock version
2017-05-11 10:06:05 -07:00
Alexander Krotov
3752ed4ee2 ServerName and ServerAlias are directives, not directories (#4632) 2017-05-10 11:43:56 -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
4d0cf8000a make a copy of keys in all python versions (#4614)
* make a copy of keys in all python versions

* documentation++
2017-05-03 18:42:47 -07:00
Brad Warren
83064941bc Merge pull request #4607 from certbot/joohoi_multiple_vhosts2
Multiple vhosts 2
2017-05-02 17:55:38 -07:00
Joona Hoikkala
65c7a5a6f7 Add support for multivhosts in Apache
* Case sensitivity fixes

* Clean up merge leftovers

* Get correct vhost paths when appending to already existing multivhost -le-ssl.conf

* Test, lint and reverter fixes

* Make py26 happy

* Removed skeletons

* Changed new vhost matching

* Added span flag for augeas init

* Extract VirtualHost using aug_span

* Removed dead code

* Fix tests to mitigate not being able to reload Augeas span values after write

* Small fixes and test coverage

* Implementing changes requested in review
2017-05-02 15:56:55 -07:00
Brad Warren
6b26015752 Further Apache multivhost improvements
* Don't filter vhosts on path if you've done so already

* add get_internal_aug_path

* Use relative augeas paths to determine if a file contains multiple virtual hosts
2017-05-02 15:56:48 -07:00
Peter Eckersley
2613a8b579 Continue work on Apache multivhost
* Apache: do not assume directives will be CamelCased

* Fixup

* Elaborate

* Simplify the definition of vh_p
2017-05-02 15:38:49 -07:00
Noah Swartz
f57f35b1dd Start work on multivhost support in Apache
* get through parsing

* not slice

* add mult vhost per file

* idx line backwards

* blocks be wrong

* always close ifmod

* let's not mess up indexes

* don't double add multi

* fix some lint, only dedupe multi

* tests

* fix lint

* in progress bit flip

* try to pick the right vhost

* take Dominic's suggestion

* don't redo search

* add ancestor

* we now support multiple vhosts

* yay

* add docstrings
2017-05-02 15:38:27 -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
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
Zach Shepherd
1c51ae2588 Pin python-augeas version to avoid error with 1.0.0 (#4422)
When running ./tools/venv.sh with 1.0.0 (now the latest version), I encountered:
    build/temp.linux-x86_64-2.7/augeas.c:434:35: fatal error: augeas.h: No such file or directory
2017-03-27 13:58:17 -07:00
Noah Swartz
09377437dc Merge pull request #4387 from dhuang/shh-apache-version
Do not output apache version when deploying cert
2017-03-21 16:39:31 -07:00
Daniel Huang
1e36783986 Still include apache version in debug logging 2017-03-18 21:37:37 -04:00
Daniel Huang
b9121a8a37 Do not output apache version when deploying cert (#4023) 2017-03-18 21:14:53 -04:00
Yen Chi Hsuan
97db9e646a Fix _get_runtime_cfg on Python 3 (#4262) 2017-03-18 18:06:32 -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
Sagi Kedmi
26a7023b8d Change QSA to NE in HTTPS redirection (#4204)
* Change QSA to NE in HTTPS redirection

* Seamless transition to new HTTPS redirection RewriteRule
2017-03-02 16:49:34 -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
Yen Chi Hsuan
7d02e129f9 Fix certbot-apache tests on Python 3 (#4172) 2017-02-24 18:21:21 -08:00
Joona Hoikkala
28cbd6e7d3 Fix for case sensitivity when looking for vhosts (#4193) 2017-02-23 20:28:36 -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
Amjad Mashaal
1fd847e216 Adding checking name validity to the Apache plugin (#3639) 2017-02-01 07:12:51 -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
Juho Juopperi
2797a0377d Fix misspelling "recieved" (#4059) 2017-01-17 13:43:43 -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
Brad Warren
9c9004aff1 Stop IDisplay AssertionErrors (#4010)
Fixes #3996.

I'm pretty confident this PR solves the problem. I've audited all calls to IDisplay methods and the assertions done in certbot.display.util are now done in all our unit tests.

With that said, it wouldn't hurt to have someone else double check I didn't miss anything. The easiest way to do this is to grep for IDisplay in our code and ensure all calls to IDisplay methods are valid. This means every method call other than notification (because a notification call is always OK) either provides a value for default or force_interactive. This is defined in interfaces.py.

I've also been considering removing the assertion that's been causing us trouble here from our release. The only argument I have for not doing so is it may hinder 3rd party plugin development. When they use IDisplay, they have the same problem as we do with prompting users without a TTY. Not keeping this assertion in makes it more likely they won't notice the issue and Certbot will crash on an unsuspecting user.

With that said, none of our known 3rd party plugins use IDisplay at all.

* Provide force_interactive in _get_certname

* Use force_interactive when asking for webroot

* Factor IDisplay assertion into it's own function

* Add util.patch_get_utility()

* Allow custom path to patch_get_utiity

* Change GetEmailTest to use patch_get_utility

* Use new_callable to create new objects

* Modify tests to use patch_get_utility

* Improve FreezableMock documentation

* Add user facing error to TTY magic

* Comment out assert_valid_call

* Add test_input_assertion_fail2()
2017-01-10 16:25:33 -08:00
osirisinferi
f9b8933f37 Add line number to Augeas syntax error message (#3974)
* Add line number to Augeas syntax error message

* Use `format()` for message formatting

* Pleasing Python 2.6
2017-01-06 12:58:51 -08:00