def METHOD_NAME (openssl_path, key_dir, key_size, replace_key):
    key_list = signing_pub_keys()
    for item in key_list:
        for key_name, key_file_name in item:
            # Generate an test private key
            priv_key_name = '%s/%s_Priv_RSA%s.pem' % (key_dir, key_file_name, key_size)
            if os.path.exists(priv_key_name) and replace_key == 'no':
                print("OS Signing Key %s already exists!!" % priv_key_name)
                user_confirm = input("Create and Replace Existing Key yes/no:  ")
                print("")
                if user_confirm.lower() != 'y' and user_confirm.lower() != 'yes':
                    continue
            print("Generating OS Private Key %s" % priv_key_name)
            cmd = '%s genrsa -F4 -out %s %s' % (openssl_path, priv_key_name, key_size)
            run_process (cmd.split())
            # Extract public key from private key
            pub_key_name = '%s/%s_Pub_RSA%s.pem' % (key_dir, key_file_name, key_size)
            print("Generating OS Public Key %s" % pub_key_name)
            cmd = '%s rsa -pubout -in %s -out %s' % (openssl_path, priv_key_name, pub_key_name)
            run_process (cmd.split())
    return