80 Commits
Author SHA1 Message Date
Brad Warren 910d1a94ca letsencrypt-nginx shim 2016-04-15 10:37:40 -07:00
Brad Warren a43fac3277 s/letsencrypt/certbot letsencrypt-nginx tests 2016-04-13 16:45:54 -07:00
Peter Eckersley 4000319c1d Merge pull request #2515 from thanatos/class-advice-impossible
Class advice impossible
2016-02-23 17:25:56 -08:00
Roy Wellington Ⅳ 9f372bfa38 Don't mix tabs & spaces in Python.
It's a bit silly, and might cause someone a lot of grief to debug.
2016-02-20 01:38:45 -08:00
Roy Wellington Ⅳ e9d981aceb Change zope's classProvides to be a class decorator.
When attempting to import any module that uses
zope.interface.classProvides in Python 3, a TypeError is raised; it
reads:

    TypeError: Class advice impossible in Python3.  Use the @provider
    class decorator instead.

Following the listed advice seems to function in Python 3.
2016-02-20 00:41:01 -08:00
Roy Wellington Ⅳ b6142c13d6 Change zope's implements to be a class decorator.
When attempting to import any module that uses zope.interface.implements
in Python 3, a TypeError is raised; it reads:

    TypeError: Class advice impossible in Python3.  Use the @implementer
    class decorator instead.

Following the listed advice seems to function in Python 3.
2016-02-20 00:37:40 -08:00
bmw 960114a08e Merge pull request #2282 from olabini/nginx_reverter_guarding
Guard reverter invocations and wrap in correct exceptions
2016-02-17 16:04:29 -08:00
Marcel Krüger 5289420692 Protect opened files against IO-exceptions 2016-01-29 20:40:28 +01:00
Marcel Krüger 90f9254fc3 Fix multiple snakeoil certs for nginx 2016-01-29 18:25:50 +01:00
Ola Bini 15182d5aa4 Add comments about the exceptions raised 2016-01-27 09:06:56 -05:00
Ola Bini 558f29bf83 Update comment to clarify that the ranking takes into account SSL 2016-01-27 09:03:09 -05:00
Ola Bini e591a7666c Guard reverter invocations and wrap in correct exceptions 2016-01-26 12:29:49 -05:00
Fan Jiang 7254ea5fb0 enable config_test in configurator prepare 2016-01-13 16:31:30 -05:00
Peter Eckersley 684ff01124 Merge pull request #2094 from twstrike/enforce-required-fields
Warn the user when --chain-path or --fullchain-path are missing but are required [minor revision requested]
2016-01-09 10:55:33 -08:00
Reinaldo de Souza Jr e7da21eec0 Makes NginxParser aware of directive
Fixes #2059
2016-01-07 11:57:00 -05:00
Reinaldo de Souza Jr 858dadd85b Update error message
This is supposed to not happen once #1391 is fixed.
2016-01-06 13:36:52 -05:00
Peter Eckersley ab9fa6c4c0 Merge pull request #2095 from twstrike/coverage
Add more tests to nginx plugin
2016-01-06 07:53:25 -08:00
Reinaldo de Souza Jr 20829e05ed Add missing test condition for prepare() 2016-01-05 15:15:29 -05:00
Reinaldo de Souza Jr adcb7934ae Improve choose_vhost() test by verifying the output file 2016-01-05 14:55:10 -05:00
Reinaldo de Souza Jr cf74446b58 Add test for redirect enhancement 2016-01-05 14:54:48 -05:00
Reinaldo de Souza Jr 5b5051b6ce The notes should display the fullchain_path
See d01b17f1 and dd8c6d65
2016-01-05 14:45:23 -05:00
Reinaldo de Souza Jr e8fc2eca01 nginx plugin requires fullchain_path 2016-01-05 14:45:23 -05:00
Reinaldo de Souza Jr 74237d1010 Requires chain_path for nginx versions supporting OCSP stapling
--chain-path config is not mandatory, so we require this property if nginx
supports OCSP stapling.

Alternatively, we could disable OCSP stapling on supported nginx versions if
--chain-path is missing.
2016-01-05 14:45:23 -05:00
Jacob Hoffman-Andrews e722a38197 Clarify parser check for duplicate values. 2016-01-04 11:18:13 -08:00
Jacob Hoffman-Andrews 8f984bd24f Better Nginx error handling.
Raise MisconfigurationError on restart failure, so we don't attempt to continue
with an authorization we know will fail.

Log at debug level the config files that are about to be written out, so it's
easier to debug restart failures.

Fix https://github.com/letsencrypt/letsencrypt/issues/942:
Error out if adding a conflicting directive.

Remove unnecessarily-inserted access_log and error_log directives. These were
added to make integration testing easier but are no longer needed. Incidentally
this makes the plugin work with some configs where it wouldn't have worked
previously.

Change the semantics of add_server_directives with replace=True so only the
first instance of a given directive is replaced, not all of them. This works
fine with the one place in the code that calls add_server_directives with
replace=True, because all of the involved directives aren't allowed to be
duplicated in a given block.

Make add_http_directives do inserts into the structure itself, since its needs
were significantly different than the more general add_server_directives. This
also allows us to narrow the scope of the `block.insert(0, directive)` hack that
we inserted to work around https://trac.nginx.org/nginx/ticket/810, since it's
only necessary for http blocks.
2016-01-01 23:09:44 -08:00
bmw 8cf63c493f Merge pull request #1568 from erikrose/kill-dvsni
Remove remaining "DVSNI" wording, changing it to reference TLS-SNI-01, which it changed into.
2015-11-25 15:30:02 -05:00
Erik Rose e75dc96559 Stop calling things that don't implement IAuthenticator authenticators. 2015-11-25 12:44:17 -05:00
Erik Rose 1d30bba0c2 Correct pep8 errors across codebase. 2015-11-19 13:23:38 -05:00
Erik Rose 9205b9c987 Remove remaining "DVSNI" wording, changing it to reference TLS-SNI-01, which it changed into. Close #1417.
Also make _get_addrs() private, since it's called only internally.
2015-11-19 13:23:07 -05:00
bmw ff293cecf1 Merge pull request #1462 from sieben/dict_litteral
Dict can be litteral
2015-11-18 18:22:45 -08:00
Peter Eckersley ee70cfbc9a Merge pull request #1372 from bit/nginx
nginx: add redirect for HTTP traffic
2015-11-17 12:38:08 -08:00
Peter Eckersley 53eaf7ce1e Merge pull request #1388 from bit/bug942
nginx: Only insert directive if its not already in block
2015-11-17 08:54:31 -08:00
j a790038a9f nginx: add redirect for HTTP traffic 2015-11-17 02:45:02 +01:00
j 43a6da1309 ignore regexp failures in nose coverage 2015-11-17 02:44:27 +01:00
j 612344d44f Ticket #942 - Only insert directive if its not already in block 2015-11-15 19:19:01 +01:00
Rémy Léone 1014cf5d9e Dict can be litteral 2015-11-14 14:06:32 +01:00
Peter Eckersley 93faa29666 Merge pull request #1454 from pritambaral/fix/1281
Check for nginx binary before running letsencrypt-nginx
2015-11-11 12:18:57 -08:00
Rémy Léone f02dcbbc4c Variable key already existing 2015-11-11 13:29:15 +01:00
Chhatoi Pritam Baral 9d30a85b29 Add test for nginx not being installed 2015-11-11 17:54:26 +05:30
Chhatoi Pritam Baral 0bbe69b36a Mock existence of nginx binary 2015-11-11 05:49:34 +05:30
Chhatoi Pritam Baral 414321fca6 Fix #1281: Check if nginx binary exists 2015-11-11 04:50:16 +05:30
Peter Eckersley d209b5ea20 Merge pull request #1411 from kuba/tls-sni-01
tls-sni-01
2015-11-07 22:42:49 -08:00
Jakub Warmuz 937e3edfc1 tls-sni-01 in apache and nginx plugins 2015-11-07 18:35:41 +00:00
Jakub Warmuz 5e8ed2bbd2 --dvsni-port -> --tls-sni-01-port 2015-11-07 18:24:17 +00:00
Dev & Sec 6bcbe641bd fix 2 IndexErrors in the nginx plugin 2015-11-07 16:21:47 +00:00
Jakub Warmuz 063544817b Kill simplehttp apache/nginx 2015-11-01 11:01:22 +00:00
Whyfoo 594613e2ce Name fix 2015-10-21 20:58:33 +02:00
Sharif Nassar 424f4f08b9 Make ./pep8.travis.sh run cleanly
98% whitespace.
2015-10-20 22:24:58 -07:00
lf 670bc1e3d3 Remove as_string as per request. 2015-10-16 19:03:21 -06:00
lf 2956d5d913 Trailing whitespace. Oops. 2015-10-15 21:28:32 -06:00