Commit graph

10392 commits

Author SHA1 Message Date
Zach Shepherd
6ee934b667 route53: shorten description to one line (#4772)
The new description is less informative than the current one, but its
shorter length makes the interactive plugin selection prompt easier
to read.
2017-06-05 11:44:22 -07:00
Brad Warren
d25069d89b Remove reference to .new in Nginx's SSL options. (#4769) 2017-06-01 15:26:54 -07:00
Brad Warren
4f00c3ea75 Merge pull request #4768 from certbot/actually-file-update-apache2
Add mechanism for updating Apache's SSL options
2017-06-01 15:25:53 -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
Brad Warren
ee70799c62 Get full test coverage on certbot.plugins.common. (#4765)
Addresses final review comments on #4720.
2017-06-01 10:55:42 -07:00
Brad Warren
738732a0db Improve bad preferred challenge error message. (#4761)
Using ArgumentTypeError causes Certbot to report an unexpected error occurred
while using ArgumentError causes argparse to print more usage information and
call sys.exit().
2017-06-01 10:42:34 -07:00
Brad Warren
791fea43ec Add regression/system test for #4719 (#4739)
* Add regression/system test for #4719.

* Test for regressions with --help and invalid args.

* Handle expected failure properly.
2017-06-01 09:57:27 -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
Yen Chi Hsuan
c9e9879ad9 Enable unit tests on OS X (#4697)
* Add OS X test

* Fix apache tests

* Use absolute path first so that certbot works with non-standard $PATH

Some tests use a fake $PATH, which prevents invoking `sw_vers`

* Also test Python 3 on Mac

* Set ulimit to fix "Too many open files"
2017-06-01 09:03:54 -07:00
Jeff R. Allen
6f98987c12 Added options to set the listen address for standalone mode (#4694)
Fixes #255.
2017-06-01 09:02:14 -07:00
Zach Shepherd
c9ff9e3c7a route53: add unit tests (#4725)
This change introduces unit tests to cover all lines of the route53
plugin except for the timeout in `_wait_for_change`.
2017-05-31 15:25:24 -07:00
Zach Shepherd
40e8fc4dec Handle releasing subpackages not included in certbot-auto (#4758)
This change refactors the release script to handle subpackages which are
not bundled as a part of cerbot-auto.

The script now allows developers to define subpackages as either being
included in certbot-auto, or not.

The script then uses one of three sets of subpackages for each operation:
 * The version number is updated for all non-certbot subpackages
   (and certbot itself is handled separately)
 * sdists and wheels are created for all non-certbot subpackages
   (and certbot itself is handled separately)
 * Testing is performed for all subpackages
 * Hashes are pinned for certbot-auto subpackages (including certbot)
2017-05-31 15:05:55 -07:00
yomna
d7f9859c3f [#3866]: "certbot certificates" checks validity with OpenSSL (#4155)
* cert signature validation for certificates subcommand + a test

* refactoring validation + adding in a check for making sure that the private key matches the certificate

* adding testing certs

* assertIsNone(x) -> assertEqual(None,x) to unbreak the py2.6 tests

* modifying test_verifu_renewable_cert_failure to hopefully appease python 3 test timeouts

* updating cryptography to be >=1.2 so that we can use verify

* removing unused, old testing certificate

* adding better error handling/logging

* adding test for IOError

* switching to a 2048 bit rsa key
2017-05-31 15:04:41 -07:00
Noah Swartz
001d90e106 add text telling people to include server config (#4745) 2017-05-31 14:24:40 -07:00
Noah Swartz
e02245a59f Merge pull request #4560 from certbot/issue_4519
update cert to certificate
2017-05-31 13:48:43 -07:00
Noah Swartz
bbc7e9259f Merge pull request #4755 from certbot/bump-cryptography-version
Bump pinned cryptography version to 1.8.2
2017-05-31 13:43:55 -07:00
Brad Warren
1276a9f7a3 Remove pinned pyasn1.
Cryptography replaced this dependency with asn1crypto in version 1.8.
2017-05-30 17:27:58 -07:00
Brad Warren
df3774e090 Bump pinned cryptography version to 1.8.1.
This allows Certbot tests to pass on macOS.
2017-05-30 17:16:35 -07:00
Andrew Ittner
ed23290232 Clean up Sphinx errors (#4706)
Also minor copyedits, suppress unhelpful errors, mark files that should
*not* be in the TOC as hidden.
2017-05-26 20:57:14 -07:00
Brad Warren
7fde26a7b4 Merge branch 'master' into issue_4519 2017-05-26 15:56:26 -07:00
Noah Swartz
52b5f5a177 undo changes to cli-help 2017-05-26 14:51:22 -07:00
Zach Shepherd
6048bfa87b route53: update setup.py to follow repo conventions (#4731)
This change updates the setup script for the route53 plugin to more
closely match conventions from other packages in the repository.

Notable changes:
 * The version number is bumped to match the rest of Certbot.
 * The package now requires a matching version of ACME and core Certbot.
 * Contact information is updated.
 * Additional versions of Python are listed.
2017-05-26 14:44:05 -07:00
Brad Warren
4a0c336484 modification-check.sh now fails if a command fails (#4746) 2017-05-26 14:41:59 -07:00
Zach Shepherd
4146685104 route53: tweak source organization to match other packages (#4729)
This change re-organizes some ancillary files to more closely match
repository conventions.
2017-05-26 11:28:55 -07:00
Zach Shepherd
c827c9ec5f NS1 DNS Authenticator (#4602)
Implement an Authenticator which can fulfill a dns-01 challenge using
the NS1 DNS API. Applicable only for domains using NS1 DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-nsone -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-nsone -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting dnsimple interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid token.
    * Path to credentials file without a token.
    * Domain name not registered to NS1 account.
2017-05-26 11:24:38 -07:00
Brad Warren
ed87b86bca Update CHANGELOG.md in response to 0.14.2 release (#4744) 2017-05-26 10:21:57 -07:00
Brad Warren
346659c47f Release 0.14.2 (#4742)
* Release 0.14.2

(cherry picked from commit d9a2612d21)

* Bump version to 0.15.0
2017-05-26 10:21:21 -07:00
Nicholas Tait
4cbdea6ccb Improve warning message to user after an operation is canceled (#4723)
Fixes #4134
2017-05-25 16:29:19 -07:00
Kevin Le
dc63056da7 add build of Dockerfile-dev (#4717) 2017-05-25 16:27:31 -07:00
Brad Warren
93310fe67c Fixes #4719 (#4737)
* Automatically delete temp log file when not used.

This allows close() calls in logging.shutdown() to cause the file to be
deleted when no logging output has been written to the file.

* Make certbot.log.MemoryHandler.flush() a noop.

This causes MemoryHandler.flush() calls in logging.shutdown to be a noop,
allowing us to control when the handler is actually flushed. This prevents log
records from being sent to a temporary file handler for things like
`certbot --version`.

* Keep reference to certbot.log.MemoryHandler.target

In Python 2.7+, the logging module only keeps weak references to created
logging handlers. Because of this, the MemoryHandler's target will not be
properly flushed and closed when logging.shutdown() is called on program exit
unless we keep a reference to it in the MemoryHandler.

* Fixes #4719.

This completes the changes necessary to fix #4719. Now temporary log files are
not created if sys.exit() is called before logging is fully set up. These files
are still created if Certbot crashes for any other reason.

* Document pre_arg_parse_except_hook args.
2017-05-25 12:16:05 -07:00
Noah Swartz
1670bfb152 fix tests 2017-05-24 14:56:12 -07:00
Noah Swartz
f59eb8e630 fix linting issues 2017-05-24 13:06:12 -07:00
Noah Swartz
7edb877ae8 merge with latest master 2017-05-24 12:32:06 -07:00
Anna Liao
8ae3a9082d updated manual challenge prompt so last sentence is complete (#4704)
Fixes #4641.
2017-05-24 11:50:37 -07:00
Zach Shepherd
ddd10548c8 route53: re-use boto3 client in wait (#4724)
This change re-uses the boto3 client in the wait method of the route53
authenticator in order to make it more mockable for testing purposes.
2017-05-24 10:37:08 -07:00
ohemorange
033c995bd2 Update options-ssl-nginx.conf inprepare if it hasn't been manually modified (#4689)
Fixes #4559.

* Update options-ssl-nginx.conf in prepare, if it hasn't been modified.

* add previous options-ssl-nginx.conf hashes

* InstallSslOptionsConfTest

* remove .new file and only print warning once

* save digest to /etc/letsencrypt

* add comment reminding devs to update hashes

* add comment and test for sha256sum

* treat hash file as text file because python3

* move constants and rename hidden digest file
2017-05-23 13:18:50 -07:00
Zach Shepherd
fb02877268 DNSimple DNS Authenticator (#4587)
Implement an Authenticator which can fulfill a dns-01 challenge using
the DNSimple DNS API. Applicable only for domains using DNSimple DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-dnsimple -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-dnsimple -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting dnsimple interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid token.
    * Path to credentials file without a token.
    * Domain name not registered to DNSimple account.
2017-05-22 17:06:04 -07:00
Aaron Cohen
42c0117c16 Domain change wording (#4709)
* Change wording of renew with new domains msg to allow clearer display.

* Further improve domain change message formatting.

* Fix text formatting tests
2017-05-22 14:43:08 -07:00
Fabian
2680879068 Print stdout when running a hook (#4167, #4487) (#4702) 2017-05-22 13:00:44 -07:00
Kevin Le
75c91940af [#4382] Install git into Docker development file (#4703)
* install git into Docker development file

* moved git install command in Dockerfile-dev to same RUN
2017-05-22 11:26:02 -07:00
Zach Shepherd
c3434bac26 DNS plugins: fix whitespace issue in authenticator pydoc (#4699) 2017-05-19 16:39:25 -07:00
Brad Warren
c2b24702b7 Fix defaults on older systems (#4691)
* Creates SupportedChallengesAction

This fixes #3987 as the call to set_by_default can be removed entirely.
Additionally, logger.warning can be used rather than writing to stderr directly
because #3184 has been resolved and we're guaranteed to having logging setup.

* Move validator to SupportedChallengesAction

supported_challenges_validator was moved to SupportedChallengesAction so
argparse.ArgumentError can be easily used to provide nice error output. Tests
in standalone_test.py were also updated so the module still has 100% test
coverage.

* Better document ArgumentError usage
2017-05-19 16:26:15 -07:00
Zach Shepherd
49c41da4f1 CloudXNS DNS Authenticator (#4585)
Implement an Authenticator which can fulfill a dns-01 challenge using
the CloudXNS DNS API. Applicable only for domains using CloudXNS DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-cloudxns -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-cloudxns -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting cloudxns interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Domain name not registered to CloudXNS account.
2017-05-19 16:23:53 -07:00
Jeff R. Allen
bbbfc473d3 Handle mixed case domains in CSRs (#4685)
Lowercase domains from CSR, just like the domains from the
command line are.

Fixes #4684
2017-05-19 13:54:00 -07:00
Brad Warren
93bf54fced Merge branch 'route53' 2017-05-19 12:33:04 -07:00
Brad Warren
1ceefa794e pin Sphinx<=1.5.6 (#4687) 2017-05-19 11:15:35 -07:00
Zach Shepherd
dbae52ef33 Merge branch 'certbot-route53' 2017-05-18 16:44:05 -07:00
Zach Shepherd
16d9537c41 Moved files to 'certbot-route53' 2017-05-18 16:44:05 -07:00
Zach Shepherd
7da5381968 Common code for Lexicon-based DNS authenticators (#4583)
Introduce abstract classes to provide base functionality for Lexicon-based DNS Authenticator plugins and corresponding test cases.
2017-05-18 14:05:47 -07:00