示例#1
0
文件: cli.py 项目: debjit/letsencrypt
def _init_acme(config, acc, authenticator, installer):
    acme = client.Client(config, acc, authenticator, installer)

    # Validate the key and csr
    client.validate_key_csr(acc.key)

    if authenticator is not None:
        if acc.regr is None:
            try:
                acme.register()
            except errors.LetsEncryptClientError:
                sys.exit("Unable to register an account with ACME server")

    return acme
示例#2
0
def _init_acme(config, acc, authenticator, installer):
    acme = client.Client(config, acc, authenticator, installer)

    # Validate the key and csr
    client.validate_key_csr(acc.key)

    if authenticator is not None:
        if acc.regr is None:
            try:
                acme.register()
            except errors.Error as error:
                logger.debug(error)
                raise errors.Error("Unable to register an account with ACME " "server")

    return acme
示例#3
0
def _init_acme(config, acc, authenticator, installer):
    acme = client.Client(config, acc, authenticator, installer)

    # Validate the key and csr
    client.validate_key_csr(acc.key)

    if authenticator is not None:
        if acc.regr is None:
            try:
                acme.register()
            except errors.Error as error:
                logger.debug(error)
                raise errors.Error("Unable to register an account with ACME "
                                   "server")

    return acme
示例#4
0
def _common_run(args, config, acc, authenticator, installer):
    if args.domains is None:
        doms = display_ops.choose_names(installer)
    else:
        doms = args.domains

    if not doms:
        sys.exit("Please specify --domains, or --installer that will " "help in domain names autodiscovery")

    acme = client.Client(config, acc, authenticator, installer)

    # Validate the key and csr
    client.validate_key_csr(acc.key)

    if authenticator is not None:
        if acc.regr is None:
            try:
                acme.register()
            except errors.LetsEncryptClientError:
                sys.exit("Unable to register an account with ACME server")

    return acme, doms
示例#5
0
def _common_run(args, config, acc, authenticator, installer):
    if args.domains is None:
        doms = display_ops.choose_names(installer)
    else:
        doms = args.domains

    if not doms:
        sys.exit("Please specify --domains, or --installer that will "
                 "help in domain names autodiscovery")

    acme = client.Client(config, acc, authenticator, installer)

    # Validate the key and csr
    client.validate_key_csr(acc.key)

    if authenticator is not None:
        if acc.regr is None:
            try:
                acme.register()
            except errors.LetsEncryptClientError:
                sys.exit("Unable to register an account with ACME server")

    return acme, doms