diff --git a/letsencrypt/client/apache_configurator.py b/letsencrypt/client/apache_configurator.py index f5ebf6be7..57b37c81c 100644 --- a/letsencrypt/client/apache_configurator.py +++ b/letsencrypt/client/apache_configurator.py @@ -251,7 +251,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator): :type vhost: VH """ - self.assoc[dn] = vh + self.assoc[domain] = vhost def get_all_names(self): """Returns all names found in the Apache Configuration. @@ -1553,7 +1553,8 @@ LogLevel warn \n\ with open(key_file, 'r') as key_fd: key_str = key_fd.read() except IOError: - raise LetsEncryptDvsniError("Unable to load key file: %s" % key) + raise errors.LetsEncryptDvsniError( + "Unable to load key file: %s" % key_file) self.register_file_creation(True, self.dvsni_get_cert_file(nonce)) @@ -1630,7 +1631,7 @@ def main(): # print name print config.find_directive( - config.case_i("NameVirtualHost"), config.case_i("holla:443")) + case_i("NameVirtualHost"), case_i("holla:443")) # for m in config.find_directive("Listen", "443"): # print "Directive Path:", m, "Value:", config.aug.get(m) diff --git a/letsencrypt/client/client.py b/letsencrypt/client/client.py index a23e7ee1b..d0e36e6be 100644 --- a/letsencrypt/client/client.py +++ b/letsencrypt/client/client.py @@ -130,8 +130,8 @@ class Client(object): _, csr_der = self.get_key_csr_pem() # TODO: Handle this exception/problem - if not crypto_util.csr_matches_names(self.csr_file, self.names): - raise errrors.LetsEncryptClientError( + if not crypto_util.csr_matches_names(self.csr, self.names): + raise errors.LetsEncryptClientError( "CSR subject does not contain one of the specified names") # Perform Challenges diff --git a/letsencrypt/client/errors.py b/letsencrypt/client/errors.py index b0f5b769b..4f93860be 100644 --- a/letsencrypt/client/errors.py +++ b/letsencrypt/client/errors.py @@ -5,5 +5,5 @@ class LetsEncryptClientError(Exception): """Generic Let's Encrypt client error.""" -class LetsEncryptDvsniError(Exception): +class LetsEncryptDvsniError(LetsEncryptClientError): """Let's Encrypt DVSNI error."""