More unifying after merge with master

This commit is contained in:
Jakub Warmuz
2014-11-30 03:07:52 +01:00
parent 3952c11d66
commit fca214ad12
4 changed files with 16 additions and 36 deletions
+10 -23
View File
@@ -36,20 +36,11 @@ class Client(object):
private_key=None, private_key_file=None, use_curses=True):
"""
:param ca_server: Certificate authority server
:type ca_server: str
:param cert_signing_request: Contents of the CSR
:type cert_signing_request: str
:param private_key: Contents of the private key
:type private_key: str
:param private_key_file: absolute path to private_key
:type private_key_file: str
:param use_curses: Use curses UI
:type use_curses: bool
:param str ca_server: Certificate authority server
:param str cert_signing_request: Contents of the CSR
:param str private_key: Contents of the private key
:param str private_key_file: absolute path to private_key
:param bool use_curses: Use curses UI
"""
self.curses = use_curses
@@ -80,14 +71,12 @@ class Client(object):
def authenticate(self, domains=None, redirect=None, eula=False):
"""
:param domains: List of domains
:type domains: list
:param list domains: List of domains
:param redirect:
:type redirect: bool|None
:type redirect: bool or None
:param eula: EULA accepted
:type eula: bool
:param bool eula: EULA accepted
:raises errors.LetsEncryptClientError: CSR does not contain one of the
specified names.
@@ -757,8 +746,7 @@ def remove_cert_key(cert):
def sanity_check_names(names):
"""Make sure host names are valid.
:param names: List of host names
:type names: list
:param list names: List of host names
"""
for name in names:
@@ -773,8 +761,7 @@ def is_hostname_sane(hostname):
Do enough to avoid shellcode from the environment. There's
no need to do more.
:param hostname: Host name to validate
:type hostname: str
:param str hostname: Host name to validate
:returns: True if hostname is valid, otherwise false.
:rtype: bool
-2
View File
@@ -32,7 +32,6 @@ def create_sig(msg, key_str, nonce=None, nonce_len=CONFIG.NONCE_SIZE):
:param str key_str: Key in string form. Accepted formats
are the same as for `Crypto.PublicKey.RSA.importKey`.
:type key_str: str
:param str msg: Message to be signed
@@ -231,7 +230,6 @@ def csr_matches_names(csr, domains):
also check the SAN extension. This is insufficient for full testing
:param str csr: CSR file contents
:type csr: str
:param list domains: Domains the CSR should contain.
+2 -5
View File
@@ -48,11 +48,8 @@ def check_permissions(filepath, mode, uid=0):
def unique_file(default_name, mode=0o777):
"""Safely finds a unique file for writing only (by default).
:param default_name: Default file name
:type default_name: str
:param mode: File mode
:type mode: int
:param str default_name: Default file name
:param int mode: File mode
:return: tuple of file object and file name
+4 -6
View File
@@ -100,8 +100,7 @@ def main():
def read_file(filename):
"""Returns the given file's contents with universal new line support.
:param filename: Filename
:type filename: str
:param str filename: Filename
:returns: File contents
:rtype: str
@@ -119,10 +118,9 @@ def rollback(config, checkpoints):
"""Revert configuration the specified number of checkpoints.
:param config: Configurator object
:type config: ApacheConfigurator
:type config: :class:`ApacheConfigurator`
:param checkpoints: Number of checkpoints to revert.
:type checkpoints: int
:param int checkpoints: Number of checkpoints to revert.
"""
config.rollback_checkpoints(checkpoints)
@@ -133,7 +131,7 @@ def view_checkpoints(config):
"""View checkpoints and associated configuration changes.
:param config: Configurator object
:type config: ApacheConfigurator
:type config: :class:`ApacheConfigurator`
"""
config.display_checkpoints()