Commit Graph
8818 Commits
Author SHA1 Message Date
Robert Kästel 5779509dbc Try 0.29.0. 2018-11-15 13:12:32 +01:00
Robert Kästel de391f43d8 Update versions. 2018-11-15 12:26:17 +01:00
Robert Kästel 2d5a6cb4f8 Move external_account_required check into BackwardsCompatibleClientV2 to be able to mock it. 2018-11-13 13:39:21 +01:00
Robert Kästel 78eb7a53ab * Remove unnecessary public key mock on most of the test.
* Restructure the directory mock to be able to mock both True and False for externalAccountRequired easily.
* Add EAB client tests.
2018-11-13 10:22:04 +01:00
Robert Kästel b3e75257a7 Set eab parameter default values to None. 2018-11-07 15:34:09 +01:00
Robert Kästel 5e94d8ece0 .encode() this JSON key. 2018-11-07 11:08:29 +01:00
ohemorangeandGitHub 547e51854c Merge branch 'master' into master 2018-11-06 14:43:55 -08:00
Robert Kästel c164d9b627 messages.py back to 100% test coverage with some EAB tests. 2018-11-06 16:52:17 +01:00
Robert Kästel 6d92f445e3 Get tests to pass after External Account Binding additions. 2018-11-06 12:01:18 +01:00
ohemorangeandBrad Warren 47062dbfbf update changelog (#6476) 2018-11-05 17:09:03 -08:00
ohemorangeandBrad Warren cbdc2ee23b Log warning about TLS-SNI deprecation in Certbot (#6468)
For #6319.

* print warning in auth_handler

* add test
2018-11-05 15:01:16 -08:00
ohemorangeandGitHub cb8dd8a428 Warn when using deprecated acme.challenges.TLSSNI01 (#6469)
* Warn when using deprecated acme.challenges.TLSSNI01

* Update changelog

* remove specific date from warning

* add a raw assert for mypy optional type checking
2018-11-05 14:50:20 -08:00
Adrien FerrandandBrad Warren bc7763dd0f Lexicon v3 compatibility (#6474)
* Propagate correctly domain to lexicon providers

* Pass required parameter to ovh provider

* Fix all other lexicon-based dns plugins
2018-11-05 14:07:09 -08:00
ohemorangeandBrad Warren 9403c1641d Stop preferring TLS-SNI in the Apache, Nginx, and standalone plugins (#6461)
* flip challenge preference in Nginx

* Fix Nginx tests

* Flip challenge preference in Apache

* Flip challenge preference in standalone

* update changelog

* continue to run with tls-sni in integration tests for coverage
2018-11-05 13:58:56 -08:00
ohemorangeandGitHub 2c1964c639 Use the ACMEv2 newNonce endpoint when a new nonce is needed (#6442)
Also, add checking to the newNonce HEAD request, and check responses in general before attempting to save a nonce, for a better error message.

* check response before adding nonce to the pool

* fix tests so that they test what they're supposed to test, and also allow the order of _add_nonce and _check_response to be switched

* make _get_nonce take acme_version

* Send HEAD to newNonce endpoint when using ACMEv2

* check the HEAD newNonce response

* remove unnecessary try; get returns None if the item doesn't exist

* instead of setting new_nonce_url on ClientNetwork, use the saved directory in ClientBase and pass that into ClientNetwork.post

* no need to test acme_version in _get_nonce

* pop new_nonce_url out of kwargs before passing to _send_request
2018-11-02 17:32:33 -07:00
Joona HoikkalaandBrad Warren a1af42bc5f Dummy AWS credentials for Route53 tests to prevent outbound connections (#6456)
Boto3 / botocore library has a feature that tries to fetch AWS credentials from IAM if a set of credentials isn't available otherwise. This happens when boto loops through different credential providers in order to find the keys. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912103

This PR simply adds dummy environmental variables for the tests that will be picked up by the credential provider iterator in order to prevent making outbound connections.

* Hardcode dummy AWS credentials to prevent boto3 making outgoing connections

* Remove the dummy credentials when tearing down test case
2018-11-02 09:59:27 -07:00
Joona HoikkalaandBrad Warren 1d783fd4b9 Update Augeas lens to fix some Apache configuration parsing issues (#6438)
* Update Augeas lens to fix some Apache configuration parsing issues

* Added CHANGELOG entry
2018-10-31 09:34:14 -07:00
Robert Kästel fdf9376ae5 Move to two separate ifs. 2018-10-31 14:11:49 +01:00
Robert Kästel ea75f80881 Inherit from object according to Google Python Style Guide. 2018-10-31 13:18:31 +01:00
Robert Kästel 622991f988 Refactored to use json field on Registration. 2018-10-30 11:35:13 +01:00
Robert Kästel cd42dacf98 Revert "Move from_data method into client."
This reverts commit 8963fae
2018-10-30 09:34:39 +01:00
Adrien FerrandandBrad Warren 9264561944 Check pattern for both old and new openssl (#6450) 2018-10-29 15:56:30 -07:00
Robert Kästel 8963fae5dc Move from_data method into client. 2018-10-29 16:53:40 +01:00
Robert Kästel ebd2af9ea0 Refactor a bit to make it possible to set the url argument. 2018-10-26 14:13:01 +02:00
Robert Kästel f20e55321c Remove whitespace. 2018-10-24 14:18:56 +02:00
Robert Kästel 854804f87d Error out when the server requires External Account Binding and the user
has not supplied kid and hmac key.
2018-10-24 14:01:27 +02:00
Robert Kästel 5dc39b66b2 Rename to account_public_key, hmac_key and make some non-optional.
Rename command line argument to --eab-hmac-key.
2018-10-23 11:40:57 +02:00
Robert Kästel 4a9b5143d6 Added external account binding to Directory.Meta. 2018-10-23 11:33:03 +02:00
Robert Kästel 7d85939237 Remove debug line. 2018-10-22 14:30:39 +02:00
ohemorangeandsydneyli 36ebce4a5f Fix ranking of vhosts in Nginx so that all port-matching vhosts come first (#6412)
To more closely match how Nginx ranks things.
2018-10-19 19:16:54 -07:00
Adrien FerrandandBrad Warren 7b17c84dd9 Remove custom code for fail fast because rolling builds in AppVeyor are enabled. (#6431) 2018-10-19 17:37:22 -07:00
Adrien FerrandandBrad Warren 1e8c13ebf9 [Windows] Create the CI logic (#6374)
So here we are: after #6361 has been merged, time is to provide an environment to execute the automated testing on Windows.

Here are the assertions used to build the CI on Windows:

every test running on Linux should ultimately be runnable on Windows, in a cross-platform compatible manner (there is one or two exception, when a test does not have any meaning for Windows),
currently some tests are not runnable on Windows: theses tests are ignored by default when the environment is Windows using a custom decorator: @broken_on_windows,
test environment should have functionalities similar to Travis, in particular an execution test matrix against various versions of Python and Windows,
so test execution is done through AppVeyor, as it supports the requirements: it add a CI step along Travis and Codecov for each PR, all of this ensuring that Certbot is entirely functional on both Linux and Windows,
code in tests can be changed, but code in Certbot should be changed as little as possible, to avoid regression risks.
So far in this PR, I focused on the tests on Certbot core and ACME library. Concerning the plugins, it will be done later, for plugins which have an interest on Windows. Test are executed against Python 3.4, 3.5, 3.6 and 3.7, for Windows Server 2012 R2 and Windows Server 2016.

I succeeded at making 258/259 of acme tests to work, and 828/868 of certbot core tests to work. Most of the errors where not because of Certbot itself, but because of how the tests are written. After redesigning some test utilitaries, and things like file path handling, or CRLF/LF, a lot of the errors vanished.

I needed also to ignore a lot of IO errors typically occurring when a tearDown test process tries to delete a file before it has been closed: this kind of behavior is acceptable for Linux, but not for Windows. As a consequence, and until the tearDown process is improved, a lot of temporary files are not cleared on Windows after a test campaign.

Remaining broken tests requires a more subtile approach to solve the errors, I will correct them progressively in future PR.

Last words about tox. I did not used the existing tox.ini for now. It is just to far from what is supported on Windows: lot of bash scripts that should be rewritten completely, and that contain test logic not ready/relevant for Windows (plugin tests, Docker compilation/test, GNU distribution versatility handling and so on). So I use an independent file tox-win.ini for now, with the goal to merge it ultimately with the existing logic.

* Define a tox configuration for windows, to execute tests against Python 3.4, 3.5, 3.6 and 3.7 + code coverage on Codecov.io

* Correct windows compatibility on certbot codebase

* Correct windows compatibility on certbot display functionalities

* Correct windows compatibility on certbot plugins

* Correct test utils to run tests on windows. Add decorator to skip (permanently) or mark broken (temporarily) tests on windows

* Correct tests on certbot core to run them both on windows and linux. Mark some of them as broken on windows for now.

* Lock tests are completely skipped on windows. Planned to be replace in next PR.

* Correct tests on certbot display to run them both on windows and linux. Mark some of them as broken on windows for now.

* Correct test utils for acme on windows. Add decorator to skip (permanently) or mark broken (temporarily) tests on windows.

* Correct acme tests to run them both on windows and linux. Allow a reduction of code coverage of 1% on acme code base.

* Create AppVeyor CI for Certbot on Windows, to run the test matrix (py34,35,36,37+coverage) on Windows Server 2012 R2 and Windows Server 2016.

* Update changelog with Windows compatibility of Certbot.

* Corrections about tox, pyreadline and CI logic

* Correct english

* Some corrections for acme

* Newlines corrections

* Remove changelog

* Use os.devnull instead of /dev/null to be used on Windows

* Uid is a always a number now.

* Correct linting

* PR https://github.com/python/typeshed/pull/2136 has been merge to third-party upstream 6 months ago, so code patch can be removed.

* And so acme coverage should be 100% again.

* More compatible tests Windows+Linux

* Use stable line separator

* Remove unused import

* Do not rely on pytest in certbot tests

* Use json.dumps to another json embedding weird characters

* Change comment

* Add import

* Test rolling builds #1

* Test rolling builds #2

* Correction on json serialization

* It seems that rolling builds are not canceling jobs on PR. Revert back to fail fast code in the pipeline.
2018-10-19 14:53:15 -07:00
sydneyliandohemorange 8dd68a6551 Add and test new nginx parsing abstractions (#6383)
* feat(nginx): add and test new parsing abstractions

* chore(nginx parser): fix mypy and address small comments

* chore(nginx parser): clean up by removing context object

* fix integration test and lint
2018-10-19 12:30:32 -07:00
Daniel McCarneyandBrad Warren 0dab41ee13 docs: remove mentions of #letsencrypt on Freenode. (#6419)
* docs: remove mentions of #letsencrypt on Freenode.

* docs: remove unused Freenode link
2018-10-18 13:12:47 -07:00
sydneyliandGitHub bfaf0296de Also write README file to /etc/letsencrypt/live (#6377)
We want to discourage people from moving things around in `/etc/letsencrypt/live`! So we dropped an extra README in the `/etc/` directory when it's first created.
2018-10-18 11:39:21 -07:00
Brad WarrenandGitHub b9dd40b350 Merge pull request #6271 from certbot/prune_neworder
Do not send status or resource fields in newOrder payloads for ACMEv2
2018-10-18 11:17:59 -07:00
Erica Portnoy 6500b9095e Add test to confirm that status isn't set on neworder object 2018-10-18 10:37:56 -07:00
Erica Portnoy ee02ed65af remove default status from Order so that the status field isn't filled in upon boulder deserialization 2018-10-18 10:26:37 -07:00
Erica Portnoy a3a3840e91 replace status field 2018-10-18 10:19:57 -07:00
Erica Portnoy ca155b48ae Merge branch 'master' into prune_neworder 2018-10-18 10:16:59 -07:00
schoenandJoona Hoikkala 3de3188dd6 Warn manual authenticator users not to remove/undo previous challenges (#6370)
* Warn users not to remove/undo previous challenges

* Even more specific DNS challenge message

* Fix spacing and variable names

* Create a second test DNS challenge for UI testing

* Changelog for subsequent manual challenge behavior
2018-10-18 14:44:45 +03:00
schoenandsydneyli 92501eaf8f Note about running on web server, not PC (#6422) 2018-10-17 14:08:59 -07:00
Ștefan Talpalaruandsydneyli 819f95c37d certbot_dns_linode: increase the default propagation interval (#6320)
Using the default value of 16 minutes (960 seconds) for
--dns-linode-propagation-seconds leads to DNS failures when the randomly
selected Linode DNS is not the first one out of six, due to an additional
delay before the other five are updated.

The problem can be easily solved by increasing the wait interval, so
this commit increases the default value to 20 minutes.

More details: https://community.letsencrypt.org/t/dns-servers-used-by-letsencrypt-for-challenges/32127/16
2018-10-17 13:48:49 -07:00
ohemorangeandsydneyli 22da2447d5 Stop caching the results of ipv6_info in http01.py (#6411)
Stop caching the results of ipv6_info in http01.py. A call to choose_vhosts might change the ipv6 results of later calls. Add tests for this and default_listen_addresses more broadly.
2018-10-17 10:54:43 -07:00
ohemorangeandsydneyli 139ef20650 Add debugging info for Nginx tls-sni and http integration tests purposes (#6414) 2018-10-15 10:41:04 -07:00
ohemorangeandGitHub e0f760099c Merge pull request #6407 from fghzxm/patch-1
Fix typo in using.rst
2018-10-09 13:50:07 -04:00
fghzxmandGitHub 19f74c3dc7 Fix typo in using.rst 2018-10-07 11:14:09 +08:00
ohemorangeandGitHub 06174bc113 Merge pull request #6388 from certbot/local-revoke-certname
revoke accepts --cert-name
2018-09-24 18:44:44 -07:00
schoenandGitHub 15932dcafc Merge pull request #6389 from DigitalBrains1/quiet-sudo
Respect --quiet when reporting sudo invocation
2018-09-24 16:34:18 -07:00
Peter Lebbing e8eeab3eab Respect --quiet when reporting sudo invocation 2018-09-23 14:22:20 +02:00