Codebase list python-certbot-dns-rfc2136 / 7fd14b7
Merge tag 'upstream/0.35.1' Upstream version 0.35.1 Harlan Lieberman-Berg 4 years ago
6 changed file(s) with 15 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
00 Metadata-Version: 2.1
11 Name: certbot-dns-rfc2136
2 Version: 0.24.0
2 Version: 0.35.1
33 Summary: RFC 2136 DNS Authenticator plugin for Certbot
44 Home-page: https://github.com/certbot/certbot
55 Author: Certbot Project
1919 Classifier: Programming Language :: Python :: 3.4
2020 Classifier: Programming Language :: Python :: 3.5
2121 Classifier: Programming Language :: Python :: 3.6
22 Classifier: Programming Language :: Python :: 3.7
2223 Classifier: Topic :: Internet :: WWW/HTTP
2324 Classifier: Topic :: Security
2425 Classifier: Topic :: System :: Installation/Setup
5656 def _validate_algorithm(self, credentials):
5757 algorithm = credentials.conf('algorithm')
5858 if algorithm:
59 if not self.ALGORITHMS.get(algorithm):
59 if not self.ALGORITHMS.get(algorithm.upper()):
6060 raise errors.PluginError("Unknown algorithm: {0}.".format(algorithm))
6161
6262 def _setup_credentials(self):
219219 except Exception as e:
220220 raise errors.PluginError('Encountered error when making query: {0}'
221221 .format(e))
222
00 """Tests for certbot_dns_rfc2136.dns_rfc2136."""
11
2 import os
32 import unittest
43
54 import dns.flags
87 import mock
98
109 from certbot import errors
10 from certbot.compat import os
1111 from certbot.plugins import dns_test_common
1212 from certbot.plugins.dns_test_common import DOMAIN
1313 from certbot.tests import util as test_util
6363
6464 def test_valid_algorithm_passes(self):
6565 config = VALID_CONFIG.copy()
66 config["rfc2136_algorithm"] = "HMAC-SHA512"
66 config["rfc2136_algorithm"] = "HMAC-sha512"
6767 dns_test_common.write(config, self.config.rfc2136_credentials)
6868
6969 self.auth.perform([self.achall])
170170 result = self.rfc2136_client._query_soa(DOMAIN)
171171
172172 query_mock.assert_called_with(mock.ANY, SERVER, port=PORT)
173 self.assertTrue(result == True)
173 self.assertTrue(result)
174174
175175 @mock.patch("dns.query.udp")
176176 def test_query_soa_not_found(self, query_mock):
180180 result = self.rfc2136_client._query_soa(DOMAIN)
181181
182182 query_mock.assert_called_with(mock.ANY, SERVER, port=PORT)
183 self.assertTrue(result == False)
183 self.assertFalse(result)
184184
185185 @mock.patch("dns.query.udp")
186186 def test_query_soa_wraps_errors(self, query_mock):
00 Metadata-Version: 2.1
11 Name: certbot-dns-rfc2136
2 Version: 0.24.0
2 Version: 0.35.1
33 Summary: RFC 2136 DNS Authenticator plugin for Certbot
44 Home-page: https://github.com/certbot/certbot
55 Author: Certbot Project
1919 Classifier: Programming Language :: Python :: 3.4
2020 Classifier: Programming Language :: Python :: 3.5
2121 Classifier: Programming Language :: Python :: 3.6
22 Classifier: Programming Language :: Python :: 3.7
2223 Classifier: Topic :: Internet :: WWW/HTTP
2324 Classifier: Topic :: Security
2425 Classifier: Topic :: System :: Installation/Setup
0 acme>=0.21.1
1 certbot>=0.21.1
0 acme>=0.29.0
1 certbot>=0.34.0
22 dnspython
33 mock
44 setuptools
0 import sys
1
20 from setuptools import setup
31 from setuptools import find_packages
42
53
6 version = '0.24.0'
4 version = '0.35.1'
75
86 # Remember to update local-oldest-requirements.txt when changing the minimum
97 # acme/certbot version.
108 install_requires = [
11 'acme>=0.21.1',
12 'certbot>=0.21.1',
9 'acme>=0.29.0',
10 'certbot>=0.34.0',
1311 'dnspython',
1412 'mock',
1513 'setuptools',
4341 'Programming Language :: Python :: 3.4',
4442 'Programming Language :: Python :: 3.5',
4543 'Programming Language :: Python :: 3.6',
44 'Programming Language :: Python :: 3.7',
4645 'Topic :: Internet :: WWW/HTTP',
4746 'Topic :: Security',
4847 'Topic :: System :: Installation/Setup',