generate a CA key and certificate key pair.
    :param filename: prefix for the key and cert file
    :param dirname: name of the directory
    :param days: days of the certificate being valid
    :param silent: whether to suppress output

def gen_ca_cert(filename, dirname, days, silent=False):
    """
    generate a CA key and certificate key pair.
    :param filename: prefix for the key and cert file
    :param dirname: name of the directory
    :param days: days of the certificate being valid
    :param silent: whether to suppress output
    """
    keyfile = os.path.join(dirname, '{}.key'.format(filename))
    ca_crt = os.path.join(dirname, '{}.crt'.format(filename))
    gen_private_key(keyfile, silent)
    gen_self_signed_cert(ca_crt, keyfile, days, silent)