def main(args=None):
    """
    Create a private key and a certificate and write them to a file.
    """
    if args is None:
        args = sys.argv[1:]

    o = Options()
    try:
        o.parseOptions(args)
    except usage.UsageError, e:
        raise SystemExit(str(e))
    else:
        return createSSLCertificate(o)