30 Commits
Author SHA1 Message Date
Brad WarrenandGitHub 4d860b37b0 Preserve preferred-challenges on renewal (#4112)
* use challenge type strings, not objectS

* Factor out parse_preferred_challenges

* restore pref_challs

* save pref_challs

* Make CheckCertCount more flexible

* improve integration tests

* Make pref_challs more flexible
2017-01-25 18:40:22 -08:00
Erica PortnoyandBrad Warren e0d112f5fb Fix expand certs regression (#4053)
* Fix expand certs regression

* also pass new domains to renew_hook
2017-01-13 15:23:09 -08:00
Brad WarrenandGitHub dc16013abe Correctly report when we skip hooks during renewal (#3977)
* Remove incorrect hook message

* Add generalized msg about skipping hooks

* Properly report when hooks were skipped

* Also print message about renew hook

* Change quotes to help OCD
2017-01-05 19:47:10 -05:00
Peter EckersleyandGitHub bc2d875ce7 Merge pull request #3918 from certbot/save-more-hooks
Save --pre and --post hooks in renewal conf files, and run them in a sophisticated way
2017-01-05 11:43:03 -08:00
Peter Eckersley 7f686b15c7 Merge remote-tracking branch 'origin/subset-renewal' into dev/3844-preserve-must-staple 2017-01-04 17:22:09 -08:00
Brad Warren 42b0188519 Merge branch 'master' into save-more-hooks 2017-01-04 12:24:53 -08:00
Brad Warren efad646960 add restore_required_config_elements test 2016-12-21 16:49:24 -08:00
Brad Warren 5119d09966 save allow_subset_of_names in renew conf 2016-12-21 16:24:28 -08:00
Brad Warren 36c9c49ab9 restore allow_subset_of_names 2016-12-21 16:12:41 -08:00
Brad Warren 2bbf28b4b9 refactor _restore_required_config_elements 2016-12-21 15:49:46 -08:00
Erica PortnoyandGitHub 81fd0cd32c Implement delete command (#3913)
* organize cert_manager.py

* add delete files to cert manager and storage

* add tests

* add to main and cli

* Clean up all related files we can find, even if some are missing.

* error messages, debug logs, and remove RenewerConfiguration

* add logs for failure to remove

* remove renewer_config_file
2016-12-15 20:23:02 -08:00
Peter Eckersley 876a760a91 Begin implementing pre / post-hook preservation 2016-12-15 17:28:16 -08:00
Erica PortnoyandPeter Eckersley 4a4977a54d Make renew command respect the --cert-name flag (#3880)
* Renew command respects --cert-name flag

* Error out early if requested cert doesn't exist
2016-12-08 18:27:23 -08:00
Erica PortnoyandGitHub 0a7ca2f32e Implement the --cert-name flag to select a lineage by its name, and the rename verb. (#3785)
* Rename and simplify main functions

* pass certname to auth method

* find cert by certname flag

* Implement --cert-name command

* don't ask to confirm new cert when we have domains and no existing certs with the lineage name

* Refactor and add --new-cert-name flag

* add interactivity to rename verb

* allow noninteractive and more descriptive function names
2016-12-08 11:53:30 -08:00
Peter EckersleyandErica Portnoy cc86ff2a21 Improve the "certbot certificates" output (#3846)
* Begin making "certbot certificates" future safe

* Handle the case where a renewal conf file has no "server" entry
2016-12-07 16:02:13 -08:00
Thomas Mayer 823cba55e3 Avoid eval() (#3844) 2016-12-07 23:02:42 +01:00
Thomas Mayer 0e237e1c0b Preserve --must-staple in configuration for renewal (#3844) 2016-12-03 06:59:32 +01:00
Erica PortnoyandBrad Warren af46f644a7 Add list-certs command (#3669)
* Switch to using absolute path in symlink

* save archive_dir to config and read it back

* cli_config.archive_dir --> cli_config.default_archive_dir

* Use archive_dir specified in renewal config file

* add helpful broken symlink info

* add docstring to method

* Add tests

* remove extraneous test imports

* fix tests

* py2.6 syntax fix

* git problems

* Add list-certs command

* no dict comprehension in python2.6

* add test coverage

* More py26 wrangling

* update tests for py3 and lint

* remove extra dep from test

* test coverage

* test shouldn't be based on dict representation order

* Redo report UX and add tests to cover

* remove storage str test

* lint and use mock properly

* mock properly

* address code review comments

* lineage --> certificate name and print fullchain and privkey paths

* make py26 happy

* actually make py26 happy

* don't wrap text
2016-11-08 15:21:42 -08:00
Gilles PietriandPeter Eckersley 0bc3e1860b Add renew_hook to options stored in the renewal config, partially tackles #3394 (#3724) 2016-11-07 15:31:50 -08:00
Peter EckersleyandBrad Warren bde1d9fdb1 Renew symlink safety (#3560)
Re-do the fix for #3497 to ensure it works in all cases.

* If lineages are in an inconsistent (non-deployed) state, deploy them

* Test new _handle_identical_cert case

* Move lineage.has_pending_deployment() check up to _auth_from_domains

Less conceptually nice, but in the "renew" verb case it wasn't being called :(

* Swap _auth_from_domains return type

 * It now matches _treat_as_renewal & _handle_identical_cert_request etc

* Revert "Move lineage.has_pending_deployment() check up to _auth_from_domains"

This reverts commit a7fe734d73.

* Move test back to handle_identical_cert_request

* We need to check for non-deployment on two separate code paths

 - Once high up in "renew" (because failure to be deployed stops us from
   divind down the stack)
 - Once way down in _handle_identical_cert_request (because that's where it
   makes the most sense for run / certonly)
 - So refactor that work into storage.py

* We don't necessarily reinstall
2016-10-04 10:18:05 -07:00
Jon WalshandPeter Eckersley 3a9769acbf Replace '-' with '_' before filtering plugin settings
This bug notably occurs when renewing certs for with the plugin `letsencrypt-s3front`
2016-08-12 16:41:18 -07:00
Brad WarrenandGitHub 26f45a61ef Merge pull request #3144 from TheNavigat/test-logging
Adding sensible UI logging for typical user
2016-06-21 14:25:36 -07:00
Sergey Nuzdhin 6a53522a6c Add additional warning with actual exception message during renewal
Log and show warning with real exception message to make it more clear what exactly happened.
Currently we show `config is broken` when in fact we have broken symlinks in live folder.
2016-06-13 14:43:47 +02:00
Amjad Mashaal 7f9a8f0f08 Adjusting logging level of certain messages 2016-06-10 06:33:11 +02:00
Blake Griffith d9d2377242 Rename certbot.le_util to certbot.util
Also rename certbot/tests/le_util_test.py to certbot/tests/util_test.py
2016-05-25 18:50:02 -05:00
Brad Warren accc83a1ca add py2.6 compatibility 2016-05-16 18:03:17 -07:00
Brad Warren b9c97954ee Add comment about removing the exception in the future 2016-05-16 17:48:26 -07:00
Brad Warren 9efdd3b38f Fixes 2977 2016-05-16 17:34:30 -07:00
Kevin Burke 8ceaf29fb8 Pass a single argument to append()
The other notify() calls in this block all pass the output of report(), but
this one attempts to pass two arguments, which results in the stack trace
described in #2822.
2016-04-18 15:36:27 -07:00
Brad Warren 3961b70deb s/letsencrypt/certbot 2016-04-13 16:03:59 -07:00