with salt.utils.files.fopen(privkeyfn, 'w') as fic:
            fic.write(salt.utils.stringutils.to_str(_file_or_content(priv_key)))