def create_multiple(logger, ctx, csv_file, config, force, key_size, san, verbose, debug, **subject): """ Create multiple certificate using csv file \f :param logger: :param ctx: :param csv_file: :param config: :param force: :param key_size: :param san: :param verbose: :param debug: :param subject: :return: """ tools.set_options(ctx=ctx, config=config, san=san, size=key_size, subject=subject, verbose=verbose, debug=debug) cert = Certificate(logger=logger, opts=tools.opts) if 'subject' in tools.opts: cert.load_subject() if csv_file: cert.generate_multiple(csv_file=csv_file, force=force) else: cert.generate_multiple(force=force)
def create(logger, ctx, name, config, force, key_size, san, verbose, debug, **subject): """ Create a single CSR \f :param logger: :param ctx: :param name: :param config: :param force: :param key_size: :param san: :param verbose: :param debug: :param subject: :return: """ tools.set_options(ctx=ctx, config=config, san=san, size=key_size, subject=subject, verbose=verbose, debug=debug) if name: tools.set_options(name=str(name)) cert = Certificate(logger=logger, opts=tools.opts) if 'subject' in tools.opts: cert.load_subject() cert.generate_csr(force=force)