43 Commits
Author SHA1 Message Date
Adrien FerrandandGitHub 9c405a3cd1 Fix cryptography OCSP support (#6751)
* Reenabling OCSP cryptography support

* Refactor the validation logic of OCSP response to match the OpenSSL one

* Prepare runtime for OCSP response test

* Move unrelated test to another relevant place

* Reimplement OCSP status checks in integration tests

* Clean script

* Protect OCSP check against connection errors

* Update tests/certbot-boulder-integration.sh

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Cleaning

* Add a specific script for letsencrypt-auto install+help

* Remove inconsistent assertion

* Add executable permissions

* Remove unused variable

* Move testdata

* Corrected cleanup code

* Empty commit
2019-02-28 00:16:52 +01:00
Adrien FerrandandBrad Warren d436259437 Forcibly reactivate tls-sni-01 challenges until complete removal. (#6683)
This PR reactivates tls-sni-01 challenges on recent Boulder versions checkout for integration tests. This allows to continue testing this challenge until it is officially dropped from server (Boulder) and client (Certbot).

Reverts #6679.
2019-01-29 19:23:08 -08:00
Adrien FerrandandJoona Hoikkala dde27e5aef Remove tls-sni-01 challenges in integration tests (#6679)
* Remove tls-sni-01 challenges in integration tests

* Remove the tls-sni test in the less invasive way

* Correct code coverage from tls-sni logic not been tested anymore.

* Update certbot-boulder-integration.sh
2019-01-20 17:53:18 +02:00
Brad WarrenandGitHub 33090ab77a Fix oldest nginx integration tests (#6642)
#6636 broke [test-everything tests](https://travis-ci.org/certbot/certbot/builds/475173804) because `_common.sh` is a common file shared between Certbot and Nginx integration tests and `--no-random-sleep-on-renew` isn't defined for the version of Certbot used in the "oldest" integration tests.

This PR adds code to `_common.sh` to check the Certbot version and if it's new enough, add `--no-random-sleep-on-renew` to the command line. I repurposed `$store_flags` and stopped exporting it because it's not used anywhere outside of this file.

Other approaches I considered and decided against were:

1. Adding this flag in `certbot-boulder-integration.sh`. I decided against it because it's setting us up for the same problem in the future if the oldest version of Certbot is upgraded in the Nginx tests and we call `certbot renew`.
2. Just upgrading the oldest version of Certbot required by Nginx to avoid these issues. While this would work (with perhaps some unnecessary burden for our packagers), I think it's avoiding the real problem here which should now be able to addressed easily with the addition of `$other_flags` and `version_at_least`.

* Add version_at_least().

* Conditionally disable sleep.

* Consolidate store_flags and other_flags.

* update comments
2019-01-04 12:44:31 -08:00
Brad WarrenandGitHub 3cb6d6c25b Don't sleep in integration tests (#6636)
Fixes #6635.

* Don't sleep in integration tests.

* add backslash
2019-01-03 11:26:15 -08: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
Brad WarrenandGitHub cee9ac586e Don't report coverage on Apache during integration tests (#5669)
* ignore Apache coverage

* drop min coverage to 67
2018-03-06 07:20:34 -08:00
Brad WarrenandGitHub 559220c2ef Add basic ACMEv2 integration tests (#5635)
* Use newer boulder config

* Use ACMEv2 endpoint if requested

* Add v2 integration tests

* Work with unset variables

* Add wildcard issuance test

* quote domains
2018-03-01 10:11:15 -08:00
Brad Warren 4c19d19cf5 Test that deploy and renew hooks are saved right
It is important that both renew and deploy hooks are saved as renew_hook in
renewal configuration files to preserve forwards compatibility.
2017-06-30 11:30:21 -04:00
Brad WarrenandGitHub 3cb92d33eb report and enforce coverage on integration tests (#4854) 2017-06-21 14:10:16 -07:00
Jacob Hoffman-AndrewsandGitHub d5f1edf2bb Dump Boulder logs on integration test failures. (#4442)
Might help debug #4363.

Also:

make "bash" vs "sh" explicit
move the paranoia flags (-ex) from the shebang into the body
add -u (fail on unset variables)
change _common to work with -u
remove some env vars that were no longer used
remove shebang from _common.sh because it's meant to be sourced, not run
2017-03-29 16:48:08 -07:00
LipisandPeter Eckersley bba5d7d950 Rename OS X -> macOS (#3965)
* Rename OS X -> macOS

* Revert *-auto
2017-01-10 12:24:15 -08:00
Brad WarrenandGitHub 39f5551305 Merge the manual and script plugins (#3890)
* Start of combined manual/script plugin

* Return str from hooks.execute, not bytes

* finish manual/script rewrite

* delete old manual and script plugins

* manually specify we want chall.token

* use consistent quotes

* specify chall for uri

* s/script/hook

* fix spacing on instructions

* remove unneeded response argument

* make achall more helpful

* simplify perform

* remove old test files

* add start of manual_tests

* fix ParseTest.test_help

* stop using manual_test_mode in cli tests

* Revert "make achall more helpful"

This reverts commit 54b01cea30.

* use bad response/validation methods on achalls

* simplify perform and cleanup environment

* finish manual tests

* Add HTTP manual hook integration test

* add manual http scripts

* Add manual DNS script integration test

* remove references to the script plugin

* they're hooks, not scripts

* add --manual-public-ip-logging-ok to integration tests

* use --pref-chall for dns integration

* does dns work?

* validate hooks

* test hook validation

* Revert "does dns work?"

This reverts commit 1224cc2961.

* busy wait in manual-http-auth

* remove DNS script test for now

* Fix challenge prefix and add trailing .

* Add comment about universal_newlines

* Fix typo from 0464ba2c4

* fix nits and typos

* Generalize HookCOmmandNotFound error

* Add verify_exe_exists

* Don't duplicate code in hooks.py

* Revert changes to hooks.py

* Use consistent hook error messages
2016-12-22 08:24:08 -08:00
Jacob Hoffman-AndrewsandGitHub 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
Brad WarrenandPeter Eckersley a5df9e5a0e Only verify required ports are available (#3608)
* only verify port is available when you actually need it

* refactor code to create achalls

* Test port checks are based on achall

* test that only the port for the requested challenge is checked in standalone
2016-10-10 18:44:39 -07:00
Brad Warren a43fac3277 s/letsencrypt/certbot letsencrypt-nginx tests 2016-04-13 16:45:54 -07:00
Brad Warren 8b613eed8f Pass additional args to letsencrypt_test_no_force_renew 2016-02-08 18:39:59 -08:00
Brad Warren 7a902daa9f duplication-- 2016-02-08 18:14:29 -08:00
Brad Warren 70402790a3 Use --non-interactive instead of --text 2016-02-08 18:07:56 -08:00
Seth Schoen fd3d2fa822 Make _no_force_renew not force renewal 2016-02-05 17:19:39 -08:00
Seth Schoen 8b02f485b0 Have a way not to force renewal in integration test 2016-02-05 17:13:30 -08:00
Brad Warren 462139fca9 Kill --agree-dev-preview 2015-12-01 16:51:05 -08:00
Peter Eckersley f74da52320 Avoid hacky --email "" case for integration tests 2015-11-17 16:06:49 -08:00
Jakub Warmuz 5e8ed2bbd2 --dvsni-port -> --tls-sni-01-port 2015-11-07 18:24:17 +00:00
Jakub Warmuz 23d3c3b1e2 Rename --simple-http-port to --http-01-port 2015-11-01 11:01:23 +00:00
root b13006ce1a Change -n flag in _commit.py to --no-redirect for clarity. 2015-10-25 00:14:46 +01:00
root 1f6cc52e66 Fix integration test bug 2015-10-25 00:07:00 +01:00
root e8f90ff993 Add flag in to _common.sh integration test 2015-10-24 23:59:36 +01:00
Jakub Warmuz aa4641b3b0 --agree-dev-preview
`git grep -i eula` to the rescue
2015-10-20 19:33:27 +00:00
Jakub Warmuz 99a31463b0 Fix typo: porta -> port 2015-10-14 19:23:33 +00:00
Jakub Warmuz 371daa42ca Quickfix for boulder#985 2015-10-14 19:16:30 +00:00
James Kasten 8dc345a3a0 address naming conventions 2015-09-26 16:04:44 -07:00
James Kasten add23360a5 Take away confirmation screen for testing 2015-09-25 20:04:34 -07:00
Jakub Warmuz c93564b99e Travis: update --server to point at directory 2015-09-09 20:22:38 +00:00
Jeff Hodges 584f19fef5 add comment for mktemp for @Kuba 2015-07-29 15:08:22 -07:00
Jeff Hodges 6a90737bbb make mktemp in integration tests work on OS X 2015-07-29 14:54:35 -07:00
Jakub Warmuz 3825633f46 Merge remote-tracking branch 'github/letsencrypt/master' into manual-integration
Conflicts:
	letsencrypt/auth_handler.py
2015-07-19 07:49:32 +00:00
Jakub Warmuz 0d63c94b8e Move nginx-boulder integration tests to subpkg dir. 2015-07-17 08:41:27 +00:00
Jakub Warmuz 5a15af5abe Change integration nginx port to 8081.
Ref https://github.com/letsencrypt/boulder/issues/482.
2015-07-17 08:30:34 +00:00
Jakub Warmuz 7dc64e0387 Rewrite acccounts and registration.
Save accounts to:

    /etc/letsencrypt/accounts/www.letsencrypt-dmeo.org/acme/new-reg/ \
    kuba.le.wtf@2015-07-04T14:04:10Z/ \
    {regr.json,meta.json,private_key.json}

Account now represents a combination of private key, Registration
Resource and client account metadata. `Account.id` based on the
account metadata (creation host and datetime). UI interface
(`cli._determine_account`) based on the `id`, and not on email as
previously.

Add `AccountStorage` interface and `AccountFileStorage`,
`AccountMemoryStorage` implementations (latter, in-memory, useful for
testing).

Create Account only after Registration Resource is received
(`register()` returns `Account`).

Allow `client.Client(..., acme=acme, ...)`: API client might reuse
acme.client.Client as returned by `register()`.

Move report_new_account to letsencrypt.account, client.Client.register
into client.register.

Use Registration.from_data acme API.

achallenges.AChallenge.key is now the `acme.jose.JWK`, not
`le_util.Key`. Plugins have to export PEM/DER as necessary
(c.f. `letsencrypt.plugins.common.Dvsni.get_key_path`)

Add --agree-tos, save --agree-eula to "args.eula". Prompt for EULA as
soon as client is launched, add prompt for TOS.

Remove unnecessary letsencrypt.network. Remove, now irrelevant,
`IConfig.account_keys_dir`.

Based on the draft from
https://github.com/letsencrypt/letsencrypt/pull/362#issuecomment-97946817.
2015-07-09 06:43:45 +00:00
Jakub Warmuz 74ce332b5a Manual SimpleHTTP integration tests. 2015-07-03 09:49:14 +00:00
Jakub Warmuz a7a863e1f2 Do not include /etc/nginx/mime.types in nginx integration testing.
This file (or /etc/nginx in whole) might not exist on the target
system.
2015-06-30 14:52:48 +00:00
Jakub Warmuz 096920b8b3 Refactor integration scripts, use --debug. 2015-06-27 13:34:23 +00:00